venuadepu - Friday, May 22, 2009 2:29 AM:
I am trying to create a workflow map with 2 stages of activities, and assigning 2 variables to stage1 and 2 variables stage2. I want to pass the values of variables of stage1 to that of stage2.
Can anyone know how to do this?
tstickel - Saturday, May 23, 2009 12:15 PM:
You can utilize a Workflow Map process variable for passing values from one activity to another within the same workflow map.
1. There is a tab on the Worklfow Map definition form, titled "Process Variable". Just add a new process variable, giving it a name and type. I am not sure what Source [...] does and I could not get Default Value to work, but they are not necessary.
2. Then you need to associate a Server Method for each activity that you want to access/set the Process Variable, In my testing I have triggered the method on an On Vote event
3. Below is an example of a Server Method. It finds the Process Variable, which I have named "toPV" and stores the current value in "InValue". Then it modifies the value to "New Value".
Dim myInnov As Innovator = Me.newInnovator()
'Me is the activity that triggered the On Vote event
Dim actID As String = Me.getID()
'Construct a query that navigates from the Activity up to the Workflow Process
Dim wfProcess As Item = myInnov.newItem("Workflow Process","get")
Dim wfProcAct As Item = myInnov.newItem("Workflow Process Activity","get")
wfProcAct.setProperty("related_id",actID)
wfProcAct.setAttribute("select","source_id")
wfProcess.addRelationship(wfProcAct)
'Before executing the query, also add AML to get the Process Variable
Dim wfProcVar As Item = myInnov.newItem("Workflow Process Variable","get")
wfProcVar.setProperty("name","toPV")
wfProcVar.setAttribute("select","id, value")
wfProcess.addRelationship(wfProcVar)
'Execute the Query
Dim wfProcessFind As Item = wfProcess.apply()
'No testing as to whether the query worked, for this sample I will assume that it did
Dim procVarItem As Item = wfProcessFind.getItemsByXPath("//Item[@type='Workflow Process Variable']").getItemByIndex(0)
'procVarItem will hold the Process variable, so get its value. It will be Null for the first activity that accesses it
Dim inValue As String = procVarItem.getProperty("value")
'Now modify the process variable value and apply to database
procVarItem.setAttribute("action","edit")
procVarItem.setProperty("value","New Value")
procVarItem = procVarItem.apply()
Return Me
venuadepu - Wednesday, May 27, 2009 2:58 AM:
Thanks for the help tstickel
sherenegladysj - Monday, June 1, 2009 8:37 AM:
Hi tstickel,
Thanks for your code. But the server method u've given to pass variables from one activity to next activity is not working. I am new to write methods in Aras. Can you please help me to resolve the problem.
Please correct me if I've missed out any steps...
I have a Process Variable named as "Hours", datatype as float & default value is 0.0 in a Workflow.
I have added the same variable "Hours" at stage1 activity to access it in 'Inbasket'. I have created a server method using your code repacing "toPV" as "Hours" wfProcVar.setProperty("name","Hours"). I have added the method on an 'OnVote' event under Stage1 Server Events.
After initiating the Workflow process, Stage1 asignee enters the value of "Hours" in 'Activity Completion Worksheet' and submits the activity.
The value of Hours is not reflected at Stage2 asignee inbasket.
I wnat the value of "Hours" from 'Stage1' to be displayed in 'Stage2'.
please help me...
I've got a doubt what is the difference between Process Variable and Activity Variables? Are they different???
Thanks,
Sherene
tstickel - Wednesday, May 27, 2009 9:08 AM:
The form used to write the method code requires an Active-X control to be loaded. If you were connecting to Innovator directly then you would follow the client configuration setup as explained in the Aras Innovator Internet Explorer Client Configuration manual (download it from the Aras web site). If you are using Remote Desktop or CITRIX to access Innovator on a remote machine then I suggest that you contact the administrator of the remote machine deal with this issue.
venuadepu - Thursday, May 28, 2009 3:22 AM:
thanks for the reply
The settings have been enabled given in the document. But still I am getting the same problem.
tstickel - Thursday, May 28, 2009 10:06 AM:
How are you connecting to the remote server? Do you launch Internet Explorer on your PC and connect using the Innovator URL? Or are you using Remote Desktop or CITRIX or something else?
venuadepu - Friday, May 29, 2009 1:17 AM:
I am using Remote Desktop and then logging into innovator(9.0) on that machine.
And those settings I mentioned above are for Remote machine only.
Can you please help me on this ASAP? Because it is urgent.
Thanks & Regards,
Venu Adepu
tstickel - Friday, May 29, 2009 9:30 AM:
Look at the solution from Aras support in the following http://www.aras.comhttp://www.aras.com/Community/forums/t/258.aspx
If that does not solve your problem, then I suggest that you contact Aras support (see http://www.aras.com/services/)
If you are using Innovator in a Production environment an Aras support subscription is a wise investment. I am not an Aras employee and provide suggestions and help as time allows as a service to the Aras community.