cancel
Showing results for 
Search instead for 
Did you mean: 

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

asheerabbas
Champ on-the-rise
Champ on-the-rise

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 ACCEPTED ANSWER

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 answer in original post

7 REPLIES 7

gdharley
Elite Collaborator
Elite Collaborator

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

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

Thankyou.

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

Greg

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

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

Yes, Thank you for your help though.

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

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.