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?
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 eventDim actID As String = Me.getID()
'Construct a query that navigates from the Activity up to the Workflow ProcessDim 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 VariableDim wfProcVar As Item = myInnov.newItem("Workflow Process Variable","get")wfProcVar.setProperty("name","toPV")wfProcVar.setAttribute("select","id, value")
wfProcess.addRelationship(wfProcVar)
'Execute the QueryDim wfProcessFind As Item = wfProcess.apply()
'No testing as to whether the query worked, for this sample I will assume that it didDim 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 itDim inValue As String = procVarItem.getProperty("value")
'Now modify the process variable value and apply to databaseprocVarItem.setAttribute("action","edit")procVarItem.setProperty("value","New Value")
procVarItem = procVarItem.apply()
Return Me
Terry Stickel, PDM Consultant
TStickel Consulting
Sanibel, Florida
Thanks for the help tstickel
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.
thanks for the reply
The settings have been enabled given in the document. But still I am getting the same problem.
Security tab
i. Trusted Sites Zone
URL for Innovator is added.
ii. Custom Level button
1. .NET Framework-reliant components
a. Run components not signed with Authenticode – Enabled
b. Run components signed with Authenticode - Enabled
2. ActiveX controls and plug-ins
a. Download signed ActiveX controls – Enabled.
b. Run ActiveX controls and plug-ins - Enabled.
c. Script ActiveX controls marked safe for scripting -Enabled.
3. Downloads
a. File download – Enabled.
4. Scripting
a. Active scripting – Enabled.
General tab
i. Settings button
1. ‘Every visit to the page’ - checked
Advanced tab
i. Browsing
1. Disable script debugging (Internet Explorer) - checked
2. Disable script debugging (Other) - checked
3. Display a notification about every script error. - unchecked
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?
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
Look at the solution from Aras support in the following http://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.
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