Вопрос

Is it possible to get current actor's id in jBPM3?

Specifically, I need to store who initiated workflow.

Это было полезно?

Решение 2

It was already suggested that I can use swimlane to get the initiator.

Here, at 11.7. Swimlane in start task

http://docs.jboss.com/jbpm/v3/userguide/taskmanagement.html

Другие советы

You might be able to use JbpmContext.getActorId(), depending on how you started your process.

Otherwise, you could maybe use the TaskMgmtSesion object to query TaskInstances (associated with your process) and get the information from there?

String configResource = "null-or-path-to-jbpm.cfg.xml"
jbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(configResource);
JbpmContext jbpmContext = jbpmConfiguration.getJbpmContext();
TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
List taskInsts = taskMgmtSession.getfindTaskInstancesByIds(ListOfTaskInstanceIds);
// Loop over taskInsts, find correct one and retrieve actorId? 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top