Skip to main content
Kinetic Community

BMC Execute Process V2

Runs the Execute Process command on the AR System server. This handler works in both Kinetic Task 2.x and 3.x.

Downloads

By downloading this file, you acknowledge that you agree to our Terms of Service

The BMC Execute Process Handler: bmc_execute_process_v2.zip

A demo service item for testing the handler: ExecuteProcess_2013_10_11__100545416.zip

Detailed Description

You can use this task handler to execute Remedy AR System Run Process and $PROCESS$ commands.  The input parameters are: Command, the process command, and Wait for server response, which can be either "Yes" or "No" to indicate if the handler should wait for a response from Remedy server.

The handler returns two result items: a value and a status.  A Return Status of zero means success.  If the process command returns nothing, the Return Value is empty.

Parameters

Name Description
Command The full text of the command (including any parameters) to be sent to the server.
Wait for server response Do you want to wait for the server's response -- Yes or No

Sample Configuration

Name Input Value
Command Application-Bus-Time2-Diff "10/11/2013 1:00:00 AM"  "10/12/2013 3:00:00 PM"
Wait for server response Yes

Results

Name Output Value
Return Value 136800
Return Status 0

 

More Examples

Creating a GUID

Here's how it looks in the demo service item.

Application-Generate-GUID Example

And here are the results.

Application-Generate-GUID Results

Delete Entry with a Qualification

Parameter Value
Command Application-Query-Delete-Entry KS_SRV_CustomerSurvey_base '179' = "AG005056960001Hy5YUgo4ZTBw75IB"
Wait for server response Yes

 

Name Value
Return Value  
Return Status 0
Note: The commands to delete entries return no output values. The status lets you know if it succeeded.

Given a Form Alias, Return the Form Name

Parameter Value
Command Application-Get-Form-Name Incidents
Wait for server response Yes

 

Name Value
Return Value HPD:Help Desk
Return Status 0

 

Count Licenses

Parameter Value
Command Application-Get-License-Count "BMC:Asset Mgmt Application"
Wait for server response Yes

 

Name Value
Return Value 15
Return Status 0

 

How to Use the Underlying Remedy API

If your handler needs to make direct calls to the AR System Java API, here's how you can be sure to get the right one.

 

    # Attempt to include the get a valid ARServerUser object
    # and include some AR classes
    begin
      # If this succeeds we're in the older API (com.remedy.arsys.api)
      server_user = @@remedy_context.ars_context.get_context
      include_class 'com.remedy.arsys.api.Constants'
      include_class 'com.remedy.arsys.api.LoggingInfo'
      include_class 'com.remedy.arsys.api.Util'
      is_old_api = true
      log "This the older AR API version."
    rescue Exception
      begin
        # If this succeeds we're in the newer API (com.bmc.arsys.api)
        server_user = @@remedy_context.ars_context
        include_class 'com.bmc.arsys.api.Constants'
        include_class 'com.bmc.arsys.api.LoggingInfo'
        is_old_api = false
        log "This the newer AR API version."
      rescue Exception
        log "Warning: Unable to get a Remedy ARServerUser context object."
      end
    end

 

With the latest version of the task engine, the underlying API has been updated from the old com.remedy.arsys.api to the latest com.bmc.arsys.api.  There are some substantial differences between these two versions.  The above code block sets a boolean to indicate whether we're using the old API and gives you the opportunity to import Java classes from either API version.

 

Change Log

Version Date Description
2 10/11/2013 Second version, accommodates the new AR System API, returns Return Value and Return Status.