149680 - no subject - #Getting Process Data\n\nWe are making a

#Getting Process Data

We are making a portal report for "All Processes" where we want to show the time at which the status of a particular process has changed. For example,the date/time when a process has gone from "active" to "pause". However, we haven't found a way to do so. We have gone through the available process metrics for designing a portal report.

Is there a way we can find the time whenever the process status has been modified.

Thanks in advance!!!

OriginalPostID-149680

  Discussion posts and replies are publicly visible

  • @nileshr To the best of my knowledge, there isn't an OOTB possibility of doing so. Probably this could be achieved by two of the following ways:

    1. Build a custom plugin to obtain the desired information.
    2. You can build a SAIL interface to perform the desired operations on processes and when ever you perform an operation (say pause namely) you could update the same in the database or trigger a process instance (which collects the desired metrics in the desired format) and update the variables in it every time based on the context of the processes which were actioned. There after you can obtain the information by querying the database or process analytics, depending on the method you choose.

    Though I am not familiar with the APIs available for us to implement the first approach, but the second way is definitely doable.
  • If you want to go the route of building a plugin, you could use the class ProcessModelSummary, which has a getter called getStatusName(). You could watch for changes in the status, and then record the timestamp when it does change.
  • Thanks sikhivahan and Aleksi for your reply. Let me elaborate my case.

    Actually, I want to extract the data from portal Process report and dump it into DB on daily basis. The problem is that I am not just getting the conditional parameter over which I should extract the data. I mean, I don't want to extract all the data from the portal report daily. Instead, I want only those instances whose information have been updated recently. That's why I was looking for some field which holds the date-time of change in the process status such that I could extract only those process instance information which have been added/modified recently (let's say today).
    Is this doable or is there any other way to achieve this?
  • @nileshr As already said, it is definitely possible to do so either by building a new plugin using the available APIs or by building a functionality making use of the OOTB features. First of all I would like to suggest you to opt for one of the approaches. My personal preference goes to a new plugin which does the work. Else the same can be done in Appian with the help of existing features.

    Please do let me know if you have any questions.
  • Hi @sikhivahan,

    Can you please throw some light on how to achieve this using OOTB features. If you can describe the procedure to follow or share some code snippet, it will be helpful.
  • @nileshr Please find attached the pseudo-code which will give you an idea of how your use case needs to be implemented. Prior to implementing the approach, I would like to suggest you to check a possibility of building plugin by your team. Also tweak the approach if required so that it is inline with the best practices.

    Please do let me know if you have any questions.
  • Thanks @sikhivahans for the pseudo code. I will implement it and let you know if I come up with any problem.
  • @nileshr You can also actually make use of 'Get Process History', a cloud approved Shared Component at https://forum.appian.com/suite/tempo/records/type/components/item/i8BCLGOdlMUpdGVqT-RV7oRg74uEGJO5CQbsn7AWpTOPFL_vruK21cW7dzOSZ4bxg/view/summary. Please refer /search?q=OriginalPostID-195809 for some details about the same.

    In the link which I have mentioned above, there was some additional discussion around counting total paused duration. But you may ignore this discussion and just make use of the output of the Shared Component, format it slightly and display in the SAIL interface. This just requires invoking a simple function - fn!getprocesshistoryinfo() and this will give you a nicely formatted dataset.