Passing variables to next activity

rated by 0 users
This post has 8 Replies | 3 Followers

Top 50 Contributor
Posts 28
Points 395
venuadepu Posted: Fri, 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?

  • | Post Points: 20
Top 25 Contributor
Posts 86
Points 1,295
tstickel replied on Sat, 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

Terry Stickel, PDM Consultant

TStickel Consulting

Sanibel, Florida

  • | Post Points: 35
Top 50 Contributor
Posts 28
Points 395
venuadepu replied on Wed, May 27 2009 2:58 AM

Thanks for the help tstickel

But I got one more problem with my Aras Innovator. Whenever I tried to create a method, the form was displaying name and description fields but the editor (where we write code)  field was disabled( or not loaded) so that I am not able to write code for that method. I am logging on a remote machine and using Aras application on that remote machine only. I don' t have an installation on my pc.
can you please help on this  or can you give your contact details so that I can able to communicate directly?
Top 25 Contributor
Posts 86
Points 1,295
tstickel replied on Wed, 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.

Terry Stickel, PDM Consultant

TStickel Consulting

Sanibel, Florida

  • | Post Points: 20
Top 50 Contributor
Posts 28
Points 395

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

 

 


Top 25 Contributor
Posts 86
Points 1,295
tstickel replied on Thu, 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? 

Terry Stickel, PDM Consultant

TStickel Consulting

Sanibel, Florida

  • | Post Points: 20
Top 50 Contributor
Posts 28
Points 395
venuadepu replied on Fri, 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

Top 25 Contributor
Posts 86
Points 1,295
tstickel replied on Fri, May 29 2009 9:30 AM

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.

Terry Stickel, PDM Consultant

TStickel Consulting

Sanibel, Florida

  • | Post Points: 5
Top 25 Contributor
Posts 50
Points 850

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

 

  • | Post Points: 5
Page 1 of 1 (9 items) | RSS