You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Feature Request: New Custom "Message" Type in Workflow

posted on July 18, 2022 Show version history

Hello,

Working on one of my recent process enhancements, I realized that it would be really nice to have an additional message type/category that wouldn't be used by workflow's own activities.

I'm envisioning something like a "General" or "Alert" type that could be used to distinguish the information we want to track from information tracked in the standard messages.

The reason I see the distinction as being important is that the Information messages are used heavily by built-in processes, for example if the workflow has a Find Entry/Entries activity that workflow is always going to have some kind of message.

As a result, we don't really have any way to call attention to a specific instance (with the exception of making everything a Business Process) other than generating a warning/error using SDK scripts and even that isn't ideal because you still can't distinguish those from the "true" errors and warnings.

 

To provide some context, one of my use cases is as follows:

We have a process for public users to submit documents to us using a Forms process. The documents are converted from PDF to native pages using the DCC and Schedule PDF Page Generation.

After the pages are generated, a workflow SDK script runs to evaluate the page dimensions to make sure they conform to our expectations.

It's not uncommon for people to submit a PDF with "bad" settings, such as a document/page with 17x22 dimensions instead of 8.5x11.

My workflow script detects this and resizes any out-of-range pages.

I'd like to note when this happens for quality assurance, but my only option is to use the WorkflowApi.TrackWarning() method because all of the instances generate standard messages.

Even then, I still get legitimate warnings so it's hard to distinguish without going to the extreme of making it a business process and utilizing the instance name.

 

As a result of this and other similar situations, I'd like to see an additional message type that's reserved for workflow designers and not used natively by workflow activities.

A new workflow activity for "Track Alert" or something along those lines would be great for people who don't know how to do it with the SDK Scripts, but regardless I'd love to have something that is reserved just for our own use without having to worry about it getting lost in the mix with the messages natively generated by Workflow instances.

 

UPDATE: Samuel Carson's suggestion seems like an objectively better approach.

2 0
replied on July 18, 2022

Personally I always use repository metadata for tracking things related to the meta of my process and only use the workflow designer for troubleshooting completly unexpected situations that need to be handled or performance improvements.

Why not use a metadata field in the repository to track this? One only workflow designers can see. Seems much easier to pull a report over combing through individual message tabs in the instance data.

You can tack on as many hidden fields as you want to any entry, regardless of template configuration. Same with workflows that start Forms process instead of handle repository entries, you can tack on as many hidden variables as you want and pull your report in Forms.

 

0 0
replied on July 18, 2022 Show version history

I already do than in many different situations, but for repository entries I use that approach primarily for "temporary" status tracking or data that's actually relevant to the lifecycle of the document, and it's not really the ideal solution for these types of scenarios where the data is more relevant to the process itself rather than to the document.

In my example:

  1. The information is only relevant at the "high level" because it doesn't impact how the document will be stored or processed afterward.
  2. If the documents are rejected, they are deleted immediately, so all the data would be lost.
  3. The documents are only in this repository temporarily while they are being reviewed/processed so once they move into the permanent repository, get printed, etc., those copies would eventually be deleted and the data would again be lost.
  4. Each document could have multiple pages that get resized so I'd have to track a multi-value field for every document just to hold information that really only matters on high level (how often does this happen) kind of scenario.
  5. At the workflow level, the documents are all grouped to a single submission/submitter so the data is more useful/actionable. After processing, each document (even from the same submission) can take any number of different routes.
  6. Running a complex search in the repository just for that metadata is overkill when all I really want to do is search Workflow for instances of ___ workflow with a "message" between certain dates.

 

Additionally, that was just one use case. I have a dozen other workflows where I'd like to trigger searchable messages based on certain events because they are more important to me than the other errors/warnings that might be generated.

As an example, if an email activity fails because of a temporary issue, a try catch will handle that and allow it to recover so I don't really care about those unless they happen unusually often, but the error is still logged regardless.

On the other hand, when email fails because of a missing/invalid email address, or the email server kicks it back because the domain wasn't whitelisted, then that is something I do want to investigate, but from the Workflow history an error is just an error so I can't single those out.

 

As another example, if a workflow is interacting with an API and gets an "intermittent" error like a 500 general server error or 408, it can just wait and try again with a try-catch, but it still generates an error message.

On the other hand, if I get a 404 error, or I get a response with model validation errors, that is something I want to flag and investigate because although they are all errors, some are much more unexpected/noteworthy. 

0 0
replied on July 18, 2022

Well I suppose another workaround I often do is have blank entries created in a hidden workflow folder, and use this for tracking internal data.

In the designer you can search by Activity Name, so I suppose you could use End Workflow activities with specific names and hold the data in the Reason textbox. This would be an alternative to enabling Business Process just to use the status field.

At the end of your workflows, you would just see if you need to call one of these End Workflows and call it before the workflow ends naturally.

0 0
replied on July 18, 2022

Jason, would the ability to further filter search results on a provided Error/Warning/Message string address what you're looking for here? I suspect that would be far earlier for us to implement than a new message type. Likely minor WF Designer UI change w/ additional SQL query constructor parameter vs core Workflow Server event logging code updates plus WF Designer UI updates.

1 0
replied on July 18, 2022

Hi Sam,

Yes, now that you mention it, being able to search/filter the contents of the messages would provide similar functionality.

A single filter/field that can be applied to all of the selected logging types would be very helpful for these situations.

Honestly, that might actually be more helpful overall since the goal is really to hunt down specific types of errors/warnings/messages and the filter would be much more targeted than what I described.

That would also help track down instances stopped by an End Workflow event or manually from the designer since those events and their given reason gets added into the logged error/warning.

1 0
replied on July 18, 2022

I've filed two feature requests, one for self-hosted and one for Laserfiche Cloud (which doesn't have a message text search option either).

My usual disclaimer of "I'm not part of Laserfiche Product Management/Dev and while I can advocate for feature requests like these I can't make any promises on if and when they'll be implemented" applies.

Workflow (Designer) Feature #387316: Workflow Designer Search support for Error/Warning/Message text search

With this basic UI mockup that borrows the "Entry name" text matching selector:

Laserfiche Cloud Workflow Feature #387320: Cloud Workflow Monitor Search support for Error/Warning/Message text search

With a similar basic UI mockup borrowing the "Entry name" text matching selector:

@████████thanks for bringing up this pain point and providing feedback on my proposed feature/solution to address it.

@████████hopefully we get this implemented and you don't have to deal with those repository entry/metadata workarounds (as often) to find the Workflow instance data you need.

1 0
replied on July 18, 2022

Sounds good. Thanks again!

1 0
replied on July 26, 2022 Show version history

@████████ Before I forget, another helpful search option would be Workflow Instance Id. I often include the WF Instance Id in error notification emails so I can track down the "problem" instance more easily, but there's no straightforward way to just run a search for that in the designer.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.