Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
5 subscribers
Views
2717 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
We have a "taskMetrics" SQL table for our applications that contains d
matthewb295
over 8 years ago
We have a "taskMetrics" SQL table for our applications that contains data for the "lag()" and "work()" expressions related to a task. We have found that the we need to retrieve the lag/work time for a task by running a Execute Process Report smart service node (since we cannot simply save these times in the task outputs), but have encountered some instances where the lag/work time aren't returned by the Execute Process Report node if it is implemented in a process flow directly after the task node. Adding a slight delay (3 seconds seems to work) allows the lag/work time can be consistently retrieved, but this sometimes causes issues when we would like to chain through the task write (for storing the created primary key from our taskMetrics table in a chained task in the process, for example).
My question is this: is there a way to guarantee that lag/work time can be queried for a task after it is complete? We are going to start using queryprocessan...
OriginalPostID-217691
OriginalPostID-217691
Discussion posts and replies are publicly visible
0
matthewb295
over 8 years ago
...alytics instead of the Execute Process Report node smart service, but I am wondering if there is a "best practice" method of retrieving lag/work time, or a guaranteed way of getting it that does not involve the use of a delay.
Thanks!
Matt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
Good question. I always try to keep stuff like this out of my models. So an idea could be to create a model with the only purpose to accept a task id, get some values by querying analytics and save it to DB. You could start this process using a!startProcess in the output tab. This hides some of the complexity, so from a maintenance perspective a send message event or a async subprocess could be another option. An additional delay inside the model should not be needed, but would not cause any issues if you add it.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
matthewb295
over 8 years ago
Stefan,
Thanks for the response! Another question for you: when you create this extra process via async, a!startProcess, or a message, have you tried to query the lag or work time for the task that is being recorded in the database? We are wondering if perhaps there is an easier way than using queryProcessAnalytics to pull that information.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
There is a plugin available. You can try that. If not, then analytics is the way to go. I did something like that for creating custom task assignment emails when task notifications by email have been disabled and used analytics for it. Never had any issues.
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@matthewb Hi, I believe that queryProcessAnalytics is easier and a clean way to pull the information and as far as my knowledge re its implementation, I would say it as a best bet. Since you are interacting with a report, there lies a possibility of extending the report and thereby obtaining the more information if needed, which presents a wider scope.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
matthewb295
over 8 years ago
Thanks, guys. One last similar question --- regarding the use of the 3 second timer, we found it eliminated a problem where the report smart service would fail to retrieve the lag/work time right after the task completed (basically, we theorized the analytics engines needed more time to cache the task data, and therefore provided an extra 3 seconds). We will definitely use queryprocessanalytics to obtain our data, but have you found that it takes a little bit of time before we can reliably retrieve task data, or have some info that brings any validity to our theory?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
In my implementation with a separate background process I never had this problem. But starting another process takes a bit of time which might be enough for analytics to catch up.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@matthewb To add a confirmation from my side, I haven't experienced any issues (such as time being taken to cache the task data) till date in my rigorous implementation of a!queryprocessanalytics().
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
matthewb295
over 8 years ago
Thanks for the info! If we have any issues with queryprocessanalytics I'll update this thread.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
Sure, will offer our support in-case if there are any issues.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel