モック・プロセス
オーケストレーション・プロセスをシミュレートします。
コマンドの可用性: IBM RPA SaaS および IBM RPA オンプレミス
スクリプト構文
IBM RPA の専有スクリプト言語の構文は、他のプログラミング言語と似ています。 スクリプト構文は、スクリプト・ファイル内のコマンドの構文を定義します。 この構文は、 IBM RPA Studioの 「スクリプト」 モードで操作できます。
mockProcess --queuename(String) --body(String) [--enqueuedtime(DateTime)] [--priority(Numeric)]
入力パラメーター
以下の表は、このコマンドで使用可能な入力パラメーターのリストを示しています。 この表では、 IBM RPA Studioのスクリプト・モードで作業しているときのパラメーター名と、それに相当する Designer モードのラベルを確認できます。
| 「デザイナー」モードのラベル | 「スクリプト」モードの名前 | 必須 | 使用可能な変数タイプ | Description |
|---|---|---|---|---|
| キュー名 | queuename |
Required |
Text |
シミュレートする必要があるキューの名前。 |
| メッセージ構造 | body |
Required |
Text |
シミュレートされたキュー内のメッセージの内容。 |
| キューに入れられたメッセージの日付 | enqueuedtime |
Optional |
Date Time, Date |
シミュレートされたプロセスの日付。 |
| 優先順位 | priority |
Optional |
Number |
シミュレートされたキューに追加されたメッセージに与えられる優先順位。 |
例
このコマンドは、オーケストレーション・プロセスをシミュレートし、このプロセスで使用する変数を作成します。
defVar --name queueName --type String --value "Simulated queue name"
defVar --name queueStructure --type String --value "Simulated queue structure"
defVar --name variableContent --type String --value "IBM Robotic Process Automation Simulate Orchestrator"
defVar --name variableReceives --type String
defVar --name successGet --type Boolean
mockProcess --queuename "${queueName}" --body "${queueStructure}Simulated queue message structure."
mockProcessVariable --name variableName --type "Text" --value "${variableContent}"
endMockProcess
currentQueueMessage queueName=queuename queueStructure=body successGet=success
mapProcessVariables --mappings "variableName=${variableReceives}"
logMessage --message "Queue name obtained: ${queueName}\r\nQueue structure obtained: ${queueStructure}\r\nSuccess get current message: ${successGet}\r\nMapped variable content: ${variableContent}\r\n" --type "Info"
// Result:
// Queue name obtained: Simulated queue name
// Queue structure obtained: Simulated queue structure
// Success get current message: True
// Mapped variable content: IBM Robotic Process Automation Simulate Orchestrator
制限
- 各スクリプトで使用できるモック・プロセスは 1 つのみです。
- このコマンドは、オーケストレーションされたプロセスをシミュレートするためにのみ使用されます。実動では使用しないでください。