BPM Suite 6 でリモートコールにより返されたプロセスインスタンスからプロセス変数を読み込む
Environment
- Red Hat JBoss BPM Suite (BPM Suite) 6.1.x
Issue
- RemoteRuntimeEngine を使用して、Business Central に配置したプロセスへの呼び出しを作成しています。呼び出されたプロセスに対してプロセス変数を読み込むにはどうしたら良いですか?
- BPM Suite 6 でリモートコールにより返されたプロセスインスタンスからプロセス変数を読み込むにはどうしたら良いですか?
Resolution
query API または AuditService を使用することができます。ドキュメンテーションで説明されているように、processId
やname
などで変数が確認できます。
...
AuditService audit = engine.getAuditService(); //get AuditLogService from RemoteRuntimeEngine
List<VariableInstanceLog> varLog = (List<VariableInstanceLog>) audit.findVariableInstances(processInstance.getId());
for( VariableInstanceLog origVarLog : varLog ) {
System.out.println(origVarLog.getVariableId());
System.out.println(origVarLog.getValue());
}
...
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments