Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » Skelta Sharepoint Accelerator Net » Skelta Sharepoint Accelerator Net » When I update variable in script action I cn...

13 posts, Page 1 of 2. 12»»

When I update variable in script action I cn...Expand / Collapse
Author
Message
Posted Monday, January 25, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Monday, February 15, 2010
Posts: 47, Visits: 138
When I update variable in script action I cn not see the new value in the next action
you can see that in the attached file

I use the variable the in subject of information action
but it take the old value

  Post Attachments 
WorkFlowExample.rar (160 views, 1.37 KB)
Post #1795
Posted Monday, January 25, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
Suhail,

The cause for the issue is you need to use ctx.Variables.Item option in the script instead of ctx.Variables.

Your script

Imports System
Imports Workflow.NET
Imports Workflow.NET.Engine
Imports System.Collections
public class WorkflowScriptjiko
public function Run(exid as Int32, exdid as Int32, ctx as Context, a as Action, inlinkop as String) as String
ctx.Variables("emp").Value="hh"
ctx.log.LogInformation("jikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkoooooooooooo" & ctx.Variables("emp").Value.ToString())
return ""
  end function
end class
  


Working one:

'Sample VBScript.NET code.
Imports System
Imports Workflow.NET
Imports Workflow.NET.Engine
public class WorkflowScript5ef16175cc2e4db4b5208476c1b30c86
public function Run(exid as Int32, exdid as Int32, ctx as Context, a as Action, inlinkop as String) as String

ctx.Variables.Item("emp").Value="SriSkelta"
ctx.log.LogInformation("jikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkoooooooooooo  " & ctx.Variables.Item("emp").Value.ToString())
return ""
end function
end class

Also, find attached the simulated workflow definition xml (remove .txt extension) and the output snapshot as a jpg.

Cheers, Sri

  Post Attachments 
SriRepository_Jiko_1.xml.txt (244 views, 11.84 KB)
ScriptOutput.JPG (147 views, 69.72 KB)

Post #1796
Posted Tuesday, January 26, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Monday, February 15, 2010
Posts: 47, Visits: 138
thank you
but my problem is not because of using item(
I can see the result in log files
but I can not see the new value for the variable emp
in the next action
Post #1799
Posted Tuesday, January 26, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
Alright!  Can you share the information/snapshot where you can see the result in log console?  Also share the latest workflow definition xml file?

Btw, Did you get a chance to import the workflow which I have shared and test the scenario?  Share your views on this.

Cheers, Sri

Post #1800
Posted Thursday, January 28, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Monday, February 15, 2010
Posts: 47, Visits: 138
I cannot import your workflow
Invalid XML workflow definition

but I tried the same code you write
i use skelta2004
Post #1803
Posted Thursday, January 28, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
That's OK.  You can get in touch with support@skelta.com to get further assistance.
Post #1804
Posted Thursday, January 28, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
Btw, can you try adding ctx.SaveVariables() line of code in your script code and then try the scenario?

For example:
ctx.Variables.Item("emp").Value="HIIII"
ctx.SaveVariables()
return "OK"

Cheers,

Post #1805
Posted Sunday, January 31, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Monday, February 15, 2010
Posts: 47, Visits: 138
thank you
Its working
Post #1811
Posted Sunday, January 31, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, January 12, 2012
Posts: 93, Visits: 121
Great.  Glad to hear that the issue is resolved and the information provided earlier was apt for your scenario.

Cheers, 

Post #1812
Posted Monday, April 05, 2010
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Thursday, September 15, 2011
Posts: 20, Visits: 47
Do you have the C# equivalent to the above code. I'm having the same problem, but I do not have an "Item" property to choose.
Post #1867
« Prev Topic | Next Topic »

13 posts, Page 1 of 2. 12»»

Reading This TopicExpand / Collapse
-
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 4:00am

 
Execution: 0.172.11 queries.Compression Enabled.

Copyright © 2002 - 2009 Skelta Software. All rights reserved. Tel: 1 (678) 306 4110 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company