Use Direct OData Submit and Direct Button with Workflow
    • 19 Mar 2024
    • 2 Minutes to read
    • Contributors
    • PDF

    Use Direct OData Submit and Direct Button with Workflow

    • PDF

    Article summary

    This article describes the steps required to set up a workflow in Customer Engagement to invoke the plugin for submitting printing contracts to Finance and Operations. This will allow an Odata dialog printing contract to be sent to FO in response to an event in CE.

    Note

    There are two ways to invoke the logic in FO without user interaction, either using a direct OData submit or by using a direct button which then invokes direct OData submit. The advantage of using the logic for direct buttons is that it is not needed to hardcode the process/caller to a direct OData submit record ID. Instead, it is mapped to the control ID on the Lasernet Button form, which then maps to the direct OData submit or HTTP method. Performance is better when using direct OData submit, however, it is easier to maintain a direct button.

    Use Direct OData Submit

    1. Create a Lasernet Direct OData Submit record. It is recommended to test and confirm that it is working by attaching it to a flyout or button.

    2. Obtain the ID of the Lasernet Direct OData Submit record and copy it from the URL. There are several ways to do this. In this example, the Power pane Plugin in the browser is used to get the Record ID.

    1. Create a new process/workflow for the entity in question.

    If this process is an action and you want to use it in a Business Process Flow, check the As a Business Process Flow action step checkbox and set As an on-demand process, if required.

    1. Add the step Lasernet.Unified.Printing.Activities.ODataDirectSubmit.

    2. Set The ID of OData Direct Submit to the ID you found in step 2.

    3. Set Inbound serialized contract (will be returned) to a JSON object. OrgName is currently a requirement in FO, so add it (either hardcode or using arguments). OrgName can be found in the Developer Resources area under Settings > Customizations. The JSON object will be sent to FO, where it can be used for report mapping and filtering.

    You can also set the remaining optional fields.

    1. Add your logic to the process and/or set when it should be started and activate it.

    Optional

    Option 1: Set Properties for Workflow Activity for Lasernet.Unified.Printing.Activities.ODataDirectSubmit

    Option 2: Add a Workflow Action and Specify OdataDirectSubmitId and Inbound Contract

    Use Direct Button with Workflow

    1. Create a Lasernet button and assign a meaningful, unique name to controlId. It will be the ID that is matched in step 5.

    2. Create a Lasernet Direct OData Submit record and assign it to the button. It is recommended to test the button, to confirm that it is working.

    If you do not want the button to be displayed, hide it using a dummy criterion, which matches nothing (entities do not exist). Apply the same criterion to the properties of the process step (primary and/or selected entity) in step 5.

    1. Create a new process for the entity in question. If this process is an action and you want to use it in a Business Process Flow, check the As a Business Process Flow action step checkbox. Set As an on-demand process, if required.

    2. Add the step Lasernet.Unified.Printing.Activities.DirectButton.

    3. Set The ID passed on from the control to the controlId you added in step 1.

    4. Set The data which are to be sent to a JSON object. OrgName is currently a requirement in FO, so add it (either hardcode or using arguments).

    The JSON object will be sent to FO, where it can be used for report mapping and filtering.

    Example

    {"AccountID": "{Account Number(Account)}", "OrgName": "orga12345" , "InvokedFrom": "MyAccountWorkflow" } The yellow marking is added from the Account entity.

    You can also set the remaining optional fields.

    1. Add your logic to the process and/or set when it should be started.

    2. Activate it.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.