Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

wanted to Create Re-occurence of Workflow

$
0
0

Hello,

 

I wanted to create a mechanism which run every hour, which maintain my workflow should be running all the time, if in case it is not running that mechanism check for it and start workflow again.

I do not want to schedule the workflow because it does not check if the current workflow is in running mode or not, it will simply execute another instance of it.

 

I think creating Policy which run every hours, should address this but since i don't know scripting much, i am unable to design this mechanism.

 

I wanted to have Policy check for Workflow Token against workflow ID and based upon token state, it should decide to execute or not. I had written something but still not sure if this is correct or what should i modify to make it working..Although not complete

 

 

var wfId = "d762a53e-fbdb-408d-8d8d-f6ee44b913ed";

System.log(wfId);

 

 

var token = WorkflowToken(wfId);

System.log(token);

System.log("Launching Automated horizontal Scaling Workflow: " + wfId);

wfId.execute();

System.log(wfToken);

 

 

System.log("startDate: " + token.startDate);

System.log("state: " + token.state);

 

 

 

While in logs i am getting below

 

 

[2014-03-03 18:42:00.896] [I] d762a53e-fbdb-408d-8d8d-f6ee44b913ed

[2014-03-03 18:42:00.896] [I] WorkflowToken:ch.dunes.scripting.jsmodel.JSWorkflowToken@402b43dc

[2014-03-03 18:42:00.896] [I] Launching Automated horizontal Scaling Workflow: d762a53e-fbdb-408d-8d8d-f6ee44b913ed

[2014-03-03 18:42:00.897] [E] TypeError: Cannot find function execute in object d762a53e-fbdb-408d-8d8d-f6ee44b913ed. (no infos#7)

 

Need your help in this case !!

 

Really Appreciate your help!!

 

Br,

 

MG


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>