Start Process Smart Service failing though Process Instance is being triggered

I am triggering a Process Instance by using 'Start Process Smart Service'. A weird behavior I have noticed is, the Process Instance is being triggered but the Start Process Smart Service is crashing with an error. The target process model has just two parameters out of which one is of type CDT(single) and other is of type Date (single). I can also clearly see the triggered instances, the parameterised variables in triggered instances populated with values configured in the Start Process Smart Service node.

Content from logs is as follows:
UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=536936184, classname=com.appiancorp.process.runtime.activities.StartProcessSmartService2
12:39:25,568 INFO [stdout] (Appian Work Item - 6406 - Proce...

OriginalPostID-240702

  Discussion posts and replies are publicly visible

  • ...ssExec02 : UnattendedJavaActivityRequest) com.appiancorp.suiteapi.process.exceptions.SmartServiceException: userMsg[error.processDetails.userMsg=Error when parsing process details or variables] alertMsg[error.processDetails.alertMsg=Error when parsing process details or variables]

    Though I took care of security, it shouldn't be an issue in any case as I am running the instances as a System Administrator.

    Has anyone come across this issue before?

    From my search, I see that the post at forum.appian.com/.../e-216246 is slightly related to it in terms of behavior (that is, process instance is being run and the node has been failing). There is also another issue at forum.appian.com/.../e-238982 which meantions a failure rate of ~10%. With issues like these, I would like to really question the reliability of this smart service until and unless we are missing something.
  • Resolution: I have resolved the issue by breaking the chain after the first node(start node) in the Process Model targeted by Start Process Smart Service, and the Start Process Smart Service node executed successfully. (The Start Process Smart Service node fails if I put the chaining back.)

    Observation: As per my observation it seemed to me that the Start Process Smart Service is in the waiting state as long as its able to bear chaining. I could see that the Start Process Smart Service node in green colour for few seconds(while refreshing the process) after its activation and is being crashed thereafter. (Please note that the process model being targeted in the Start Process Smart Service is chained heavily.)

    I don't think the above-mentioned is a standard behaviour as the Process Instance being triggered is expected to proceed asynchronously and shouldn't depend on any attributes(such as chaining) in the target Process Model.

    If the resolution I have opted for is valid, what if I want to use the Process Model(being targeted in Start Process Smart Service) in other Process Models in a chained fashion? Do I need to create a wrapper again to achieve activity chaining? I don't think this was mentioned in the Documentation.
  • Yes, the documentation does not mention the effect of chaining in target process model on the start process smart service. My theory about what is happening is as follows: The start process smart service will block (i.e not proceed further execution) until it gets the response that the process model which it targeted either started successfully or failed to start. Although the smart service is asynchronous, it needs feedback - if the process model it targetted started successfully or not.
    It seems that - internally the start process smart service maybe having some timeout. i.e it will wait for the response from the target process model for some pre-determined time. If it does not get any response in that time, it will timeout and crash. Activity Chaining maybe blocking longer than the internal timeout of that smart service and causing it to crash. The nature of Activity chaining is synchronous while the smart start process smart service is asynchronous. The interaction between these maybe causing it to fail.

    Of course this is just my theory and I could be wrong.
  • +1
    Certified Lead Developer
    This is apparently a known issue on some versions of the platform and a fix will be distributed in due course, it is being tracked under - AN-74826
  • @chetany As said earlier, it seemed to me that it's waiting for something (similar to the synchronous call) and I agree with your theory as I understood in a similar way finally after few trails. But an asynchronous call shouldn't really care about the configurations in the first place. For instance when we trigger a process using messaging or sub-process node, the activity chain in the target process model will be ignored. Also as said earlier, if this(what we are discussing about) behavior proves to be true/valid, the target model should be an asynchronous wrapper over the synchronous model(if the model is intended to be activity chained) which is not desirable.

    Anyways, as mentioned by @dcooke, this is an issue and we have raised a support ticket for the same.
  • @sikhivahan, on our environment, we are using a!startprocess rather than the smart service to start a process model from sail form.
    The process model takes list of numbers as parameter. We did not have chaining initially. It worked fine.
    We then added chaining to check if it affects a! startprocess. But it still worked.
    My understanding is that both the smart service and the sail function are expected to behave similar. But it does not seem so.
    Can you also try using starting the process model using the function and keeping the chaining. Let me know your observations.
  • @chetany Sure, will do it and let you know shortly. I think even that didn't work as far as I remember.
  • Sikhivahans, have been following your posts for a while.  Thanks!  I have a similar issue.

    I have 4 nodes in my process model - Start node, User Input Form, Execute SP and End node.  There is no activity chaining.  Upon execution,

    1) The user input form from the task disappears on Submit as expected but the stored proc in Monitor never completes and it remains in green for a long time like 3 minutes. The database changes from SP are NOT updating as expected. But the stored proc executes in a few  seconds outside of Appian.  

    If I activity chain all the nodes a different  thing happens - SP node still  in green

    but this time I am able to see the updates from SP in the database but the User Input form stays on with an Appian unexpected error.

    Should I activity chain differently?