java - Camunda process instance loses its process variables - TagMerge
3Camunda process instance loses its process variablesCamunda process instance loses its process variables

Camunda process instance loses its process variables

Asked 1 years ago
0
3 answers

if your processInstance is completed then you cannot read the variables any more. You have to use the history endpoints for that. But could you give some more information of how this happens ?

are you using camunda rest ? Use the endpoints to fetch tasks and read their variables if that is the case

Source: link

0

camunda introduced a new, separate query for process instance variables:
VariableInstance v = 
  runtimeService.createVariableInstanceQuery()
    .processInstanceIdIn(pId)
    .variableName("myVariable")
  .singleResult();

Source: link

0

// TODO: Double check!completeTask(      taskId: "547811"    variables: [        {            name: "approved"            value: true        }    ])
public interface TwitterDemoProcessConstants {  String VAR_NAME_TWEET = "tweet";  String VAR_NAME_APPROVED = "approved";}
public class PublishTweetJobHandler implements JobHandler  {    public void handle(JobClient client, ActivatedJob job) throws Exception {        String tweet = job.getVariablesAsType(TwitterDemoProcessVariables.class).getTweet();        // ...
public class TwitterDemoProcessVariables {        private String tweet;    private boolean approved;    public String getTweet() {        return tweet;    }    public void setTweet(String tweet) {        this.tweet = tweet;    }}

Source: link

Recent Questions on java

    Programming Languages