State Flow()

aahitha2
Mega Expert

Hi All,

I am new to scripting, the below mentioned script has been written in one of my requirement(work order task gets created from work order). what is the exact functionality of below

new StateFlow().processFlow(current, '3530e4b8d7102100bbc783e80e6103fe', 'manual');

And why we use new StateFlow().processFlow('Sys_ID','manual') and why we use amnual in that script line

 

Thanks,

Bhagya

3 REPLIES 3

Chuck Tomasi
Tera Patron

State flows have two possible uses. Manual creates a UI action. Automatic creates a business rule.

UI actions are manually triggered - a human has to click the button or link.

Business run based on database operations (save, update, delete, etc.)

Any other questions?

Docs: State Flows

Hi Tomasi,

Thank you for your valuable reply.

Exactly what will do that new stateflow().processflow('sys_id',manual) ????

 

Manual- creates ui action i understood but still i need clarityhow will create wnd where it will create and why we willl use state flow and process fow ??

Community Alums
Not applicable

Hi Chuck,

 

i got your point but i have one doubt - instated of sys_id (hot- coded) i have created the property but it's not working .

could you please help me how to write that one.

var flowIds = gs.getProperty('change.stateflow.type');
var flowId = flowId.split(',');

new global.StateFlow().processFlow(current, flowId[0], 'manual');