Salesforce

How Do I Dynamically Call a Program Within Another Application Not Defined as a Component? (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Dynamically Call a Program Within Another Application Not Defined as a Component? (Magic xpa 2.x)

While components are easy to use, you can call programs in another application without using components. There are several ways to do this, including implementing your called programs as COM objects or SOAP services. But the two most direct methods are using a Call Remote, or Call by Name.

Note that when you use these types of calls, the Magic xpa Studio has no information about the object you are calling until runtime, so it is up to you to code the name and arguments correctly.

Using Call Remote

  1. First, set up a Service that points to the other application. That is done in Options->Settings->Services. Zoom from the Endpoint column to select the application you want to use.

  2. Next, code your Call Remote operation.

    1. Open up a line by pressing F4.

    2. Type C for Call.

    3. Type R for Remote.

  1. Go to the Operation Properties to enter the rest of the operation (Alt+Enter, or click on the Properties pane if it is open).

  2. From the Service field, zoom to select the service that points to the application you want.

  3. Type in the Program name. This should be the public name of the program within the application you are calling. It is up to you to type it correctly.

  4. Zoom from the Arguments field to enter whatever arguments the program requires. Again, it is up to you to set them correctly, there is no automatic match-up as there is with a component.

Now, when the program runs, it will call the program from the other application.

Using Call by Name

  1. Enter the Call By Name operation:

    1. Open up a line by pressing F4.

    2. Type C for Call.

    3. Type N for by Name.

  2. Go to the Operation Properties (Alt+Enter, or click on the Properties pane if it is open).

  3. Zoom from the Public program name to get to Expression rules. Type in the public name of the program you want to call.

  4. Zoom from the Cabinet file name field to enter the name of the cabinet file that has the program.

  5. Zoom from the Arguments field to enter the arguments you want to send and receive from this program.

That’s all there is to it. The program will be called from the cabinet file you specified.

Hint: Although we show the path name typed in for clarity, it would be better to use a variable in the Main Program to hold the path name for all the components being used, and to use Logical Names.

Reference
Attachment 
Attachment