Skip to main content

I want to use a command output of previous operation as condition in decision block instead of exit code.

if Command out put is a string value “No jobs to display”,i want to proceed for next operation,if not i want to close workflow with a append in jobdescription

 

But in decission making when i use a string value it always returns false

 

Log:

 

5206 CommandActivity         : LastJob (LastJob_1)] command succeeded with result iNo jobs to display.]
5206 WorkflowStep            : LastJob (LastJob_1)] completing activity with status vCOMPLETED], outputs P<LastJob_1><system><startTime>1623636233</startTime><endTime></endTime><status>RUNNING</status><timedOut>false</timedOut></system><instance></instance><backupSet>defaultBackupSet</backupSet><subClient>default</subClient><jobStatus></jobStatus><exitCode>0</exitCode><commandOutput>No jobs to display.</commandOutput></LastJob_1>]
5226 SetActivityInputs       : tDecision (Decision_1)] starting activity with inputs c<inputs><expression>xpath:{/workflow/LastJob_1/commandOutput} == "No jobs to display."</expression><scriptType>JAVA</scriptType></inputs>]
5243 DecisionActivity        : oDecision (Decision_1)] result of decision expression is false]
5243 DecisionActivity        : cDecision (Decision_1)] taking transition iUpdateJobDescription_2] because result sfalse] matches inputed condition

 

 

Could anyone help me on this

Hi, 

To really help you will need to upload the xml of the workflow to see what you are trying to pass through. From the log lines it looks as though you want to report of completed jobs only but the job is running so giving a false and thus not displaying the job details.

Blaine


With Java, you need to use the equals method for comparing strings

xpath:{/workflow/LastJob_1/commandOutput}.equals("No jobs to display.")

 

 


Reply