When a process is started does the variables set in the execution remain there even after the process has been completed?

cancel
Showing results for 
Search instead for 
Did you mean: 
asheerabbas
Active Member

When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Hi Everyone,

I have created a process in which there are multiple script tasks and services task. In the script the variables are both get and set from execution.getVariable and execuition.setVariable.

The problem is that when once the process is completed, and i try to start it again it shows duplicated values until i deploy the entire model workspace again and run the process.

Please advice.

Thank you.

1 Solution

Accepted Solutions
asheerabbas
Active Member

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

I have figured out the solution, There was an issue in the custom classes i made. It didn't actually clear the variables set in the execution.

Thank you

View solution in original post

7 Replies
gdharley
Intermediate

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Not sure I understand what you mean by "after I start it again".

Once a process instance is complete, it cannot be restarted as the process data is removed from the runtime tablesa and only exists in the history tables.

Can you provide more details.

Thanks,
Greg

asheerabbas
Active Member

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

I meant when i start the process again form the Deployed process definitions.

Thankyou.

gdharley
Intermediate

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Unusual. Never seen that before. You go screen shots and a process model or bar file you can share?

Greg

asheerabbas
Active Member

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

I have figured out the solution, There was an issue in the custom classes i made. It didn't actually clear the variables set in the execution.

Thank you

gdharley
Intermediate

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Ahh yes, something to be aware of is that any JabaDelegate (service implementation) is shared across all instances. Meaning, you need to think of it as a singleton as class level properties could potentially bleed across instances.

This is mentioned in the users guide but probably not highlighted.

Greg

asheerabbas
Active Member

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Yes, Thank you for your help though.

asheerabbas
Active Member

Re: When a process is started does the variables set in the execution remain there even after the process has been completed?

Jump to solution

Can you help out with writing an if condition in expression language? Which works in Activiti. I have posted a question on profile if you want to have a look at it.

Thank you