Forum Discussion

oeakdemir's avatar
oeakdemir
Creator I
7 years ago
Solved

how to change the state of a dynamically instantiated workflow

Hi,

I want to change the state of a dynamically instantiated workflow.

So far, I could set the "Current Status" of workflow process "Pending" to "Active" by using "promote" method.

But there is no active state within the workflow process and no assignment task is created.

What is the way I shall go so that workflow process has an active state and assignment task is created.

Here is the code I have used so far : 

....

Item wflMap = inn.getItemByKeyedName("Workflow Map", wflMapName);

Item wfl = this.instantiateWorkflow(wflMap.geID());

wfl.promote("Active", "no comment");

return this;

  • it works when we use

    wfl.startWorkflow() 

    instead of 

    wfl.promote("Active","nocomment") 

1 Reply

  • it works when we use

    wfl.startWorkflow() 

    instead of 

    wfl.promote("Active","nocomment")