クラス CallPerlRule
java.lang.Object
jp.ne.mki.wedge.rule.base.AbstractBase
jp.ne.mki.wedge.rule.base.AbstractCommon
jp.ne.mki.wedge.rule.common.other.CallPerlRule
- すべての実装されたインタフェース:
CommonInterface
,jp.ne.mki.wedge.run.interfaces.RuleEngineInterface
Perlロジッククラス呼び出し
Perlプログラムを呼び出すためのロジッククラスです。
呼び出した先のPerlプログラムは、ロジッククラスの代わりとして実装することが出来ます。
Constant.wdgに対して下記属性を追記することができます。
"jp.ne.mki.wedge.rule.common.other.CallPerlRule.command"
Perlのコマンドを記述します。
指定しない場合は「perl」と実行されます。
perlの実行ディレクトリがパスに含まれていない場合は
こちらの設定を変更する必要がございます。
設定例)
「/usr/bin/perl」
"jp.ne.mki.wedge.rule.common.other.CallPerlRule.rootpath"
Perlコマンド実行時のルートディレクトリを指定します。指定しない場合は、カレントディレクトリがルートディレクトリとなります。
(SAMC上で実行した場合は、./run.sh を起動したディレクトリとなります。)
設定例)
「/opt/tomcat/webapps/myproject/WEB-INF/perlscript/」
"jp.ne.mki.wedge.rule.common.other.CallPerlRule.timeout"
Perlコマンド実行時のタイムアウト時間を指定します。
デフォルトで60秒がタイムアウトとなります。
タイムアウトを設定しない場合は、この項目に-1を指定してください。
"jp.ne.mki.wedge.rule.common.other.CallPerlRule.encode"
Perlに文字列データを送信する際に使用される文字コードを指定します。
指定しない場合はシステムのデフォルトエンコードが使用されます。
エンコードの種類によっては、文字化けが発生する可能性がありますので、
ご注意下さい。
設定例)
「UTF-8」「EUC-JP」「MS932」
"jp.ne.mki.wedge.rule.common.other.CallPerlRule.dirchange"
Perl実行時にカレントディレクトリの位置を変更する場合はtrueを、
変更しない場合はfalseを指定してください。
省略時はtrueとなります。
動作例)
rootpath 「/usr/local/perl」
実行ファイル 「calculate/DecimalCalcAdd.pl」
dirchange 「false」
→ 実行結果
/usr/local/perlをカレントディレクトリとし、
calculate/DecimalCalcAdd.plを実行します。
rootpath 「/usr/local/perl」
実行ファイル 「calculate/DecimalCalcAdd.pl」
dirchange 「true」
→ 実行結果
/usr/local/perl/calculate をカレントディレクトリとし、
DecimalCalcAdd.plを実行します。
(※ カレントディレクトリの位置によって、require で指定するファイルパスが
変わりますので、ご注意下さい。)
[I/O RECORD]
InputRecord | OutputRecord |
---|---|
呼び出し先のPerlプログラムに合わせた引数を設定してください。 | 呼び出し先のPerlプログラムに合わせた返り値を設定してください。 |
[RULE PARAMETER]
Parameter |
呼び出し先のPerlファイル名。 呼び出し先のPerlプログラムに、ロジッククラスパラメータを送信したい場合は、 コロン(:)区切りで指定をします。 設定例) "DecimalCalcAdd.pl" "calculate/DeCimalCalcAdd.pl" "SetValue.pl:Hello World" |
---|
- 導入されたバージョン:
- 1.2.0
- バージョン:
- 1.0
-
フィールドの概要
フィールド修飾子とタイプフィールド説明protected static final String
自動ディレクトリ変更(定数ファイルキー)protected static final String
Perl実行コマンド(定数ファイルキー)protected static final String
データ送受信時の文字コード(定数ファイルキー)protected static final String
protected static final String
PerlファイルRootディレクトリ(定数ファイルキー)protected static final String
タイムアウト時刻(定数ファイルキー)クラスから継承されたフィールド jp.ne.mki.wedge.rule.base.AbstractBase
controlRecord, engineManager, errorMessage, executeType, id, inputRecord, logicalName, logicClassDelegate, outputRecord, physicalName, ruleParameter, ruleType, serverParameter, userConstant
インタフェースから継承されたフィールド jp.ne.mki.wedge.rule.base.interfaces.CommonInterface
CANCEL, ERROR, EXECUTE_BOTH, EXECUTE_CLIENT, EXECUTE_DEBUG, EXECUTE_HTMLGATEWAY, EXECUTE_SERVER, EXECUTE_SERVERDC, IO_ERROR, IO_ERROR_EXECUTE_PARAMETER, IO_ERROR_IN, IO_ERROR_IO_MUST_SAME_COUNT, IO_ERROR_ITEM_TYPE, IO_ERROR_OUT, IO_ERROR_PARAMETER, NONE, OK, PARAMETER_DELIMITER, SKIP, USER_ERROR
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
クラスから継承されたメソッド jp.ne.mki.wedge.rule.base.AbstractCommon
getLogicClassType, getManager, terminate
クラスから継承されたメソッド jp.ne.mki.wedge.rule.base.AbstractBase
callDispose, checkDelegate, createErrorMessage, createLogicErrorLogRecord, createLogicExceptionLogRecord, createLogicLogRecord, dataClearOfOutRecord, dataClearOfRecord, dispose, executeRule, getAppAccount, getAppAuthority, getAppMenu, getAppPassword, getClassErrorName, getClientId, getConnectionId, getConnectionPoolId, getConstantKeys, getConstantValue, getConstantValueAsStringArray, getControlRecord, getDbAccessCount, getDbErrorCode, getDbErrorMessage, getDbStatus, getDbUpdatedRecordCount, getEngineManager, getErrorMessage, getErrorMessage, getErrorMessage, getExceptionMessage, getExecuteType, getId, getInputRecordIterator, getInRecord, getInRecord, getInRecord, getInRecordCount, getInRecordList, getIpAddress_G_Index, getIpAddress_P_Index, getLogicalErrorName, getLogicalName, getLogicClassDelegate, getOutputHtml, getOutputRecordIterator, getOutRecord, getOutRecord, getOutRecord, getOutRecordCount, getOutRecordList, getPhysicalErrorName, getPhysicalName, getProjectId, getQueryEndLine, getQueryMaxCount, getQueryPageCount, getQueryStartLine, getReturnString, getRowSize, getRowSizeOfInRecord, getRuleParameter, getRuleParameters, getRuleParameters, getRuleParameters, getRuleType, getRuleTypeName, getServerMessage, getServerParameter, getServerStatus, getServerSubName, getServerSubRevision, getServerTran, getUpdateErrorLine, getUpdateTargetCount, getWebServerIpAddress, isExecutable, isJDK15, log, logDebug, logError, logError, logFatal, logFatal, logInfo, logTrace, logWarn, logWarn, loopInOutRecord, loopInOutRecordSub, loopInRecord, loopInRecordSub, loopOutRecord, loopOutRecordSub, setControlRecord, setEngineManager, setErrorMessage, setErrorMessageMustInRecord, setErrorMessageMustOutRecord, setErrorMessageMustParamIsNumber, setExecuteType, setFatalError, setId, setInRecord, setLogicalName, setLogicClassDelegate, setOutputHtml, setOutRecord, setPhysicalName, setPropertyFromEngine, setRuleParameter, setRuleType, setServerParameter, setUserConstant, showErrorDialog, showErrorDialogAddRuleName, writeErrorLog, writeErrorLog, writeLog, writeLog, writeLog, writeTraceLog
-
フィールド詳細
-
CONSTANT_PREFIX
-
CONSTANT_COMMAND
Perl実行コマンド(定数ファイルキー) -
CONSTANT_ROOT_PATH
PerlファイルRootディレクトリ(定数ファイルキー) -
CONSTANT_TIMEOUT
タイムアウト時刻(定数ファイルキー) -
CONSTANT_ENCODE
データ送受信時の文字コード(定数ファイルキー) -
CONSTANT_AUTO_DIRECTORY_CHANGE
自動ディレクトリ変更(定数ファイルキー)
-
-
コンストラクタの詳細
-
CallPerlRule
public CallPerlRule()
-
-
メソッドの詳細
-
getIOParameter
インタフェースからコピーされた説明:CommonInterface
IOパラメータ取得。execute
の前に実行される。- 戻り値:
- int OK=処理続行、IO_ERROR=入出力レコードエラー、IO_ERROR_IN=入力レコードエラー、IO_ERROR_OUT=出力レコードエラー、 IO_ERROR_IO_MUST_SAME_COUNT=入力レコード数と出力レコー数の非合致エラー、IO_ERROR_PARAMETER=パラメータエラー、 IO_ERROR_EXECUTE_PARAMETER=実行リストパラメータエラー
- 例外:
Throwable
- 関連項目:
-
execute
インタフェースからコピーされた説明:CommonInterface
処理を実行。- 戻り値:
- int OK=処理続行、ERROR=異常終了、CANCEL=処理を中断(正常終了)、SKIP=次行を実行しない、USER_ERROR=戻り値をユーザ側で任意に設定
- 例外:
Throwable
- 関連項目:
-
setExtendsInformation
結果メッセージ以外の情報について設定が必要な場合、 このメソッドを継承して実装することができます。- パラメータ:
outHeader
-
-
exit
インタフェースからコピーされた説明:CommonInterface
- 例外:
Throwable
- 関連項目:
-