Varo/Stelo Integration

Triggering Looply from Varo/Stelo

You can trigger a Looply workflow as part of your Varo or Stelo process by calling method /LOOPLY/CORE=>TRIGGER_WF as described here.

As part of the trigger, you may wish to pass the form/app data to Looply as a JSON string. Varo users on version 320 or later can use function module /FLM/GET_DOC_DATA_JSON to retrieve it. Users on earlier versions can create a copy of the function module in the Z-namespace as follows:

Create function group ZFLM_GET_DOC_DATA_JSON with the following master program:

*******************************************************************
*   System-defined Include-files.                                 *
*******************************************************************
  INCLUDE lzflm_get_doc_data_jsontop.        " Global Declarations
  INCLUDE lzflm_get_doc_data_jsonuxx.        " Function Modules

*******************************************************************
*   User-defined Include-files (if necessary).                    *
*******************************************************************
  INCLUDE lzflm_get_doc_data_jsonsub.        " Subroutines

Function group include LZFLM_GET_DOC_DATA_JSONTOP:

FUNCTION-POOL zflm_get_doc_data_json.       "MESSAGE-ID ..

* INCLUDE LZFLM_GET_DOC_DATA_JSOND...        " Local class definition

TYPES: BEGIN OF gtyp_repeating_sf,
         subform TYPE /flm/sfs_sf,
       END OF gtyp_repeating_sf.
*
DATA: gs_fpe          TYPE /flm/fpe,
      gt_fdata        TYPE /flm/xml_tab_t,
      gt_repeating_sf TYPE TABLE OF gtyp_repeating_sf,
      gv_dd_text      TYPE flag.

Function group include LZFLM_GET_DOC_DATA_JSONSUB

Finally, create a new function module and add it to the function group:

Function module ZFLM_GET_DOC_DATA_JSON

Approving a Varo form/Stelo document from a Looply card

In order to approve a Varo form or Stelo document from a Looply card you will need to make a POST request to SAP from your Looply workfow as described here. In your function, you can use function module /FLM/DOCUMENT_PROCESS_ACTION to process the approval or rejection. If you wish to also update the form/app data and are using Varo version 310 or earlier you can install Varo note 254 . This adds new import parameter IM_FORM_DATA to the function module for the new/updated data.

Example

The following is an example of a simple use-case: when a user submits a Varo form or a Stelo app, an approver gets a Teams card with information about the request, an input field for adding comments and options to approve or reject the request. The approver action (and any added comments) are processed by the Varo back-end. If the request is approved, the process is complete. If it is rejected, the user is notified in Teams and has the option to re-submit or cancel the request.

In the Looply Process Determination table, we have the following configuration:

The workflow is triggered and resumed in the routing user-exit (you may also use posting adaptors to do this) depending on the routing step/FLM action:

The above code triggers the following workflow:

In the approver card we have the following section, containing the comments input field, action buttons and error message:

When the approver clicks on an action button on the card, the following Z-function is triggered:

Last updated