Converting v7 VB Script to v9 C#
I have a version 7 procedure which I am converting to a version 9 process. It uses a Server-Side VB Script to write data into a word document. The script uses the 'ework.' syntax to access ework variables and functions. For example:
'Get ework variable called NumItems and assign it to VB variable called NoOfLines
NoOfLines=Cint(ework.NumItems)
'Initiate ework SQL Select statement contained in the ework variable called SelectDataCommand and assign the results to a VB variable called datastring
datastring=ework.SelectSQL(ework.SelectDataCommand)
'Perform ework substring command to extract part of datastring
extractstring=ework.substring(1,x,datastring)
Please can someone tell me what the v9/c# replacement for these functions are?
Many Thanks,
Rick.
Comments
-
You need to pass the Process object or the Process Business Object into the function and reference that. This was all handled for you behind the scenes in v7 by passing in the ework object.
We typically pass in the Current object and then reference the process BO from that. In the function you need to add a parameter of the same type as the Process itself.
For example, to evaluate roles in our Release Management solution (available for download here) we define the following parameter type:
Metastorm.Runtime.Models.ReleaseManagement.REL_SystemBuild.Declarations.REL_SystemBuildData
Thast is the Process Business Object. If we wanted to define a parameter that can be passed in as the 'Current' object, we would define a parameter of type:
Metastorm.Runtime.Models.ReleaseManagement.REL_SystemBuild
from that object we can access the BO and its variables.
The first method is easiest to use in the C# code, and more flexible because you can pass in the BO from a process or form. The second is easier to use from the the other end.
I hope that makes some kind of sense. It is not a simple subject, I'm afraid.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories