Advanced workflow scenario

it is subjective on what is “advanced”…Please take it with a grain of salt.

Here is 1st case: I am into a territory of long run wf with combination of machine and human. Let say, the wf is to start some steps by machine/microservice, then send to 3rd party vendor for processing through email. They take few days to complete their step. Once the reply back from vendor ( could be email or fax), then we can continue to rest of the flow by staff. This case has few hurdles to resolve
— we can have a activity to send email to 3rd party vendor, but I cannot mark the activity to be complete as I have to wait for the reply form vendor. So somehow, we have to mark it pending or in progress status, then move to next email activity.
— Once the 3rd party vendor sent the email back, we need to resume the work.
— We want to calculate the SLA for each step. hence time for each step needs to be tracked.

My 2nd case: another scenario is that once the request is submitted, it routes to backoffice staff, they may have question on how the work should be fulfilled because the customer information is changed somehow. He needs to send the request back to the requester for further instruction.

The first use case can still be categorized as workflow, the second one is more expanding to case management space. I do not know if that is still in the realm of Temporal.

Appreciate any thought.

These certainly fall into the simple workflow category :).

  1. Use an activity to send an email to the vendor. This activity should have a pretty short timeout and an appropriate retry policy to account for that the email service can be down for some time. The vendor reply is delivered to the workflow as a signal. The workflow waits for signal and a timer (to account for SLA) to continue its execution.

  2. This sounds like a good candidate for using signals as well.

I like the signal for use case 1, although I am not certain of the use case 2. The second use case is not predictable. This is up to the back office staff’s judgment. A extension of this scenario is pending or transferring to other people because I am on vacation tomorrow. This is for the tools like Pega. I am worried that I may overstretch temporal.

The second use case is not predictable. This is up to the back office staff’s judgment

I don’t understand your concern. Back office staff is going to send a signal that includes its judgment. It is certainly can be modeled as a Temporal workflow.

Workflows are code in Temporal. As code can implement practically any business requirements you can write a Temporal workflow that implements them.