バッチの終了
verb: endBatch
使用可能: < 標準>
インスタンスのバッチを終了し、 バッチの開始 コマンドによって開始された実行へのアクセスから他の実行をアンロックします。
1. ワークフローは、プロセス・フロー制御エンジンです。 ワークフローは BPMN ファイル内のプロセスを表します。
2. インスタンスは、処理される項目を表します。 これは、ワークフロー実行のデータを受け取り、各タスクをそれぞれのプロセスに割り当てるための変数です。
構文
endBatch
例
バッチの開始コマンドによりすべてのインスタンスが実行された後で、バッチの終了 コマンドによりバッチ実行が終了されます。
defVar --name mappedWorkflow --type Workflow
defVar --name a --type Numeric --value 0
defVar --name workflow --type Workflow
defVar --name workflowInstance --type WorkflowInstance
defVar --name instancesBatch --type WorkflowBatch
defVar --name instanceToExecute --type WorkflowInstance
defVar --name executedInstances --type Boolean
defVar --name instancesQuantity --type List --innertype WorkflowInstance
// Download the following file to run the command.
loadWorkflow --isfromfile --file "bpmnTestVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" --automapvariables workflow=value
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=beginSubroutine" mappedWorkflow=value
createBatch --description "Batch containing Workflow instances" --workflow ${workflow} --key initialBatch --comment "Creates a batch to store Workflow instances" instancesBatch=value
while --left "${a}" --operator "Less_Than" --right 5
incrementVar --number ${a}
createWorkflowInstance --workflow ${workflow} --businessstatus "In Progress" --businessstatusreason "Developing Script" --defaultvalues "a=${a}" --batch ${instancesBatch} workflowInstance=value
endWhile
listWorkflowInstances --workflow ${workflow} --status "New" --batchkey loteInicial instancesQuantity=value
beginBatch --batch ${instancesBatch} --timeout 00:00:40
// Starts the execution of the batch.
foreach --collection "${instancesBatch}" --variable "${instanceToExecute}"
executeWorkflow --instance ${instanceToExecute} executedInstances=Success
endFor
endBatch
// Ends the execution of the batch.
logMessage --message "Instances Quantity: ${instancesQuantity.Count}\r\nInstance Executed: ${executedInstances}" --type "Info"
beginSub --name beginSubroutine
logMessage --message Executed --type "Info"
return
endSub
ファイルをダウンロード
サンプル・スクリプトを実行するには、ファイルをダウンロードし、そのパスを「ワークフローのロード」コマンドの「ファイル」パラメーターに指定する必要があります。