Unable to show the form (process mode start node form )when the user click on button.

Hi,

I have a process model with a start node that will trigger an interface.

Now, I would like to call this process model when a specific button/link is clicked. When I try to use the below code, it is actually initiating a process model, but it is not loading an interface form where the user can enter data through form elements/fields.

Am I missin anything here. Can somone advise please. Thanks.

a!formLayout(
  buttons: a!buttonLayout(
    primaryButtons: {
      a!buttonWidget(
        label: "Submit",
        value: loggedInUser(),
        saveInto: a!startProcess(
          processModel: cons!AT_ConsCaptureEmployee,
          processParameters: "",
          onSuccess: "Ok",
          onError: "Not Found"
          ),
        submit: true,
        style: "PRIMARY"
      )
    },
    secondaryButtons: {
      a!buttonWidget(
        label: "Cancel",
        value: true,
        saveInto: ri!cancel,
        submit: true,
        style: "NORMAL",
        validate: false
      )
    }
  )
    
  )

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    You can't do this from a button - you should be able to do it from a link, however.  a!startProcess() is specifically for launching an asynchronous instance of a process, i.e. it'll fire off in the background and the user will not see any immediate interaction with it (though tasks that get assigned from that instance will work as normal).

    Instead you should be using the a!startProcessLink() component, which i recommend you call from a!richTextDisplayField().  That component is intended to direct the user into a started process, either to its start form or the first chained user input task.  The one caveat, as i mentioned, is that you can't call this from a button.

Reply
  • +1
    Certified Lead Developer

    You can't do this from a button - you should be able to do it from a link, however.  a!startProcess() is specifically for launching an asynchronous instance of a process, i.e. it'll fire off in the background and the user will not see any immediate interaction with it (though tasks that get assigned from that instance will work as normal).

    Instead you should be using the a!startProcessLink() component, which i recommend you call from a!richTextDisplayField().  That component is intended to direct the user into a started process, either to its start form or the first chained user input task.  The one caveat, as i mentioned, is that you can't call this from a button.

Children