Skip to main content
kavyam0002
Brainy
Nov 16, 2021 9:07 AM UTC
Question

How can i include process model in interface

my code is correct? let me know if any changes required...

my requirement is - if cr_app_la_all_processs_model process model is running then don't show that add projects link if not listed process model then show the add project link 

can anyone let me know if am wrong 

    2 replies

    stefanhelzle0001
    Brainy
    Nov 16, 2021 10:27 AM UTC

    This does not work. a!startProcess would start a process. You can not use it to fetch information about a running instance.

    For this you would use process reporting and queryProcessAnalytics(). This is well documented.

    davel001150
    Inspiring
    Nov 16, 2021 4:22 PM UTC

    Your code fails for one very simple reason:

    a!startProcess() starts a process asynchronously, thus it will not complete before your SAIL re-evaluates.  This means you can't return any process variables; you can't return anything.  You have a!startProcess() as the first parameter of your if() statement, and the first parameter of if() must return either true or false.  Yours returns nothing, and must return nothing.  So it can't be the first parameter of your if().

    That's why it's not working.