Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #1 

Function in Script Doesn't Appear in Integration Wizard

                        Created: 25 Apr 2005
Last edited: 20 Sep 2005


The information in this article applies to product: e-Work all versions

Issue

  • When using the e-Work Integration Wizard to call a function or sub in a server-side script, the function or sub doesn't appear in the 'script call' drop-down. If the code is created manually, an error is generated when the Engine attempts to call the function.

    As an example, the e-Work function %Script is correctly used to call the sub MailMergeTest() as follows:

    %Script(VBScript,,%Procedure.Name,%MapName,"MailMergeTest")

    The server-side script contains the following sub, which incorrectly calls the e-Work Print() function:

    Sub MailMergeTest()
      ework.Print("C:\Temp\eworkMailMergeTest.doc",ework.FolderId,"","C:\Temp\temp.doc")
    End Sub

    When the Engine attempts to execute %Script(VBScript,,%Procedure.Name,%MapName,"MailMergeTest"), it will fail, and an error will be generated on both the client and Engine server.

Resolution

  • If the %Print function were called directly, not through a server-side script, the following is the correct syntax:
    %Print("C:\Temp\eworkMailMergeTest.doc",%FolderId,"","C:\Temp\temp.doc").

    However, for the example above, the proper syntax is

    Sub MailMergeTest()
      ework.Print "C:\Temp\eworkMailMergeTest.doc",ework.FolderId,"","C:\Temp\temp.doc"
    End Sub

    Note the lack of parentheses. Once this change is made, 'MailMergeTest' will also appear in the 'script call' drop-down in the Integration Wizard.

  • A syntax error in any function or sub in a script will prevent all of the functions and subs in that script from appearing in the 'script call' drop-down in the Integration Wizard.

Keywords: kb546


__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!