Page 1 of 1

SwitchClient : returning steps of the flow

Posted: Wed Dec 14, 2011 9:03 pm
by PremediaRossel
Hello,

I have a PitStop based Flow in PowerSwitch.

How can I return information about the position of the job in the flow (pe

: like "Input", "PitStop", "Dispatching").

Could I use metadata (readable in the list view in SwitchClient) and how

to do that ?

Best regards,

Michael

SwitchClient : returning steps of the flow

Posted: Thu Dec 15, 2011 7:42 am
by bert_vr
PremediaRossel wrote: Hello,

I have a PitStop based Flow in PowerSwitch.

How can I return information about the position of the job in the flow (pe

: like "Input", "PitStop", "Dispatching").

Could I use metadata (readable in the list view in SwitchClient) and how

to do that ?

Best regards,

Michael


Michael,



There are different solutions to you challenge.



You could use the folder element's name and save this info into the job's hierachy container or you could assign different job states in several folder elements in your flow.



Both containers can be visualized easily in a checkpoint by using metadata fields where you then call these containers through the variable dialog. You can choose to use a simple text field or a more complex dropdown list. That's up to you.



Bert

SwitchClient : returning steps of the flow

Posted: Thu Dec 15, 2011 11:12 am
by Clive Andrews
...or just trigger an email...?



We have specific Job arrived emails, one to customer, one to CSR - then a job passed email, configurable to customer/CSRs...

SwitchClient : returning steps of the flow

Posted: Wed Jan 04, 2012 6:28 pm
by dkelly
The following Javascript will print all of the incoming and outgoing connections to the log.





var flowName = s.getFlowName();

var elementName = s.getElementName();



s.log(1, "flow name: " + flowName);

s.log(1, "element name: " + elementName);



// list in connections

var i;

var inConnectionList = s.getInConnections();

s.log(1, "In connections (" + inConnectionList.length + ")");

for (i=0; i < inConnectionList.length; i++) {

var theConnection = inConnectionList.getItem(0);

var theName = theConnection.getName();

var theType = theConnection.getConnectionType();

var theFolderName = theConnection.getFolderName();

s.log(1, (i+1) + " name: " + theName + " type: " + theType + " folderName: " + theFolderName);

}

// list out connections

var outConnectionList = s.getOutConnections();

s.log(1, "Out connections (" + outConnectionList.length + ")");

for (i=0; i < outConnectionList.length; i++) {

var theConnection = outConnectionList.getItem(0);

var theName = theConnection.getName();

var theType = theConnection.getConnectionType();

var theFolderName = theConnection.getFolderName();

s.log(1, (i+1) + "- name: " + theName + " type: " + theType + " folderName: " + theFolderName);

}





Dwight Kelly

Apago, Inc.

dkelly@apago.com

SwitchClient : returning steps of the flow

Posted: Thu Jan 05, 2012 8:02 am
by rzacherl
Hi,



the best way to do that is to write the actual job state into a database which can be accessed internally or even externally (by customers who are aloud to track their own jobs) via a web front-end. All you have to do is to place a suitable flow element which allows to communicate with your database at critical points within your flow(s) and update the actual job state in a job specific database record.

The optional database module of PowerSwitch 10 would allow such a solution.



Regards,



Robert