Skip to main content

#Flow-Orchestration4 debatiendo

after all orchstreation items are completed still order is in progress and orchestration in not completed in salesforce vlocity orchestration. 

LastOrchestration Item type is Milestone.  

 

#Vlocity

 

#Flow-Orchestration

 

#Omnistudio  #Order Management

1 respuesta
  1. 24 sept, 19:05

    A Milestone being the last item is usually the clue here. In Industries (Vlocity) Order Management a Milestone is only a marker: it completes automatically once all of its "Depends On" items are complete, and it never fails, but it does not do any work itself. Completing the milestone does not by itself update the Order record, so an order can sit "In Progress" even though every item on the plan looks green. These are the checks I would go through: 

     

    1. Confirm every item on the plan really is finished. In the orchestration plan view (or by querying the Orchestration Item records for that plan), look for any item that is not Completed, for example Pending, Ready, Running, Failed or Frozen, including items in other swimlanes or in plans of other decomposed/fulfilment-request orders. A single item still pending (often a manual task or a callout waiting for a response) keeps the plan open. 

     

    2. Check that the background processing is running. Orchestration items are progressed by Industries OM asynchronous jobs. Look at Setup > Apex Jobs and Scheduled Jobs for failed or aborted vlocity_cmt jobs and at the debug logs for the user running orchestration. If the jobs are not scheduled or are failing, the plan state is never re-evaluated. 

     

    3. Make sure something actually updates the Order status. Order status normally changes because of an Auto Task in the plan (commonly the asset-creation / order-completion step near the end), not because the last milestone completed. If your plan ends with only a Milestone, add an Auto Task after it (dependency: Depends On the milestone) whose item implementation updates the Order status or runs your standard "create assets / complete order" logic, and re-test with a new order. 

     

    4. For the stuck order itself, once you have found the cause you can retry the failed item from the plan view, or complete the remaining item manually, and the plan should move to Completed. 

     

    References: 

    Understanding Order Management Orchestration Basics (Trailhead):

    https://trailhead.salesforce.com/content/learn/modules/industries-order-management-orchestration-foundations/dive-into-industries-order-management-orchestration

     

    The Industries Order Management Solution:

    https://help.salesforce.com/s/articleView?id=ind.comms_t_the_industries_order_management_solution_229538.htm&type=5

     

    Troubleshooting Industries Order Management:

    https://help.salesforce.com/s/articleView?id=ind.comms_t_troubleshooting_industries_order_management_242806.htm&type=5

     

     

    Assumption: I am assuming this is managed-package (vlocity_cmt) Industries Order Management with a standard plan where the Order status is expected to be updated by a task in the plan. Exact job names and item implementations differ by release and by how your plan definition was built, so please share the state of each orchestration item and whether any Auto Task follows the milestone if the checks above don't resolve it.

0/9000

I have created 1 Orchestration Flow. It is breaking for 1 one of the Activity on the Connect Portal. 

If I am running the Orchestration Flow outside of the Connect Portal then it is working fine and giving me the respected output. 

I am working in 3-4 sandboxes but only on 1 sandbox it is giving me the following error.  

 

An Error Occurred with Your "Project Approval Flow" Orchestration

 

 

You’ve received this email because an error occurred while your "Project Approval Flow" orchestration was running. 

View debugging information for this orchestration in Flow Builder.

 

 

Error element Submit_for_Approval5 (FlowOrchestratedStage). 

An error occurred. Try again, or contact Salesforce Customer Support and provide this error ID: 53194206-372493 (1440708959)  

 

Can anyone help me with this. 

Is any permission or something is missing for the connect portal because of that it is not working. 

Need to find the solution asap. 

 

#Customer Service  #Flow-Orchestration

 

#Flows #Salesforce Developer #Architects

0/9000

Programmatically Approving/Rejecting Flow Orchestration Approval Steps (and why ConnectApi.FlowApprovalProcesses won't work)

 

The problem

If you're using Flow Orchestration with Approval Steps and need to let users approve or reject work items from somewhere other than the standard Work Guide component — for example, from a custom mobile experience, since Work Guide does not render in the Salesforce mobile app despite showing up fine in Lightning App Builder's phone preview — you'll hit a wall pretty fast.

Here's what doesn't work, and why, so you don't have to burn the hours we did finding out:

Dead end #1: ConnectApi.FlowApprovalProcesses.getFlowApprovalProcessWithStatus()

This looks like exactly the right API — it's documented specifically for retrieving the status and available actions of a flow approval process. In practice, for Orchestration-embedded Approval Steps specifically (as opposed to standalone autolaunched Flow Approval Processes invoked via a "Request an Approval" flow element), we found:

  • Calling it via Apex throws ConnectApi.ConnectApiException: Id=null when passed the Flow API name for processNames
  • Calling the identical request via raw REST (same org, same inputs) succeeds and returns correct data — ruling out an Apex-only bug
  • When it does succeed, it consistently returns isApprovalInProgress: true but only exposes a "Recall" action — never Approve/Reject, even when querying as the actual assigned approver, not the submitter

We filed this with Salesforce Support and it's now a tracked Known Issue: W-23702762. Support confirmed this API path does not currently support returning Approve/Reject actions for Orchestration Approval Steps.

Dead end #2: Classic Approval.process()

The older, well-documented Approval.ProcessWorkitemRequest / Approval.process() Apex API only works against classic ProcessInstanceWorkitem records. Flow Orchestration Approval Steps create ApprovalWorkItem records instead — a different object entirely. Attempting to use the classic API against an ApprovalWorkItem Id throws INVALID_CROSS_REFERENCE_KEY.

The actual solution: reviewApprovalWorkItem

There's a standard invocable action — not prominently linked from the API you'd naturally start with — that does exactly what's needed:

  • Action name: reviewApprovalWorkItem
  • Inputs: approvalWorkItemId (String), approvalDecision (String — must be exactly "Approve" or "Reject", capitalized), comments (String, optional)
  • Preconditions: the work item's Status must be Assigned, and the calling user must be the assignee (or a delegate, or hold a higher role)

Calling it from Apex:

apex

Invocable.Action action = Invocable.Action.createStandardAction('reviewApprovalWorkItem');

action.setInvocationParameter('approvalWorkItemId', workItemId);

action.setInvocationParameter('approvalDecision', 'Approve'); // or 'Reject' — exact capitalization required

action.setInvocationParameter('comments', 'Optional comment text');

List<Invocable.Action.Result> results = action.invoke();

Boolean success = results[0].isSuccess();

We found the documentation for this action almost by accident, linked from the "Recall Approval Submission Action" doc page — it's filed under Salesforce's "Advanced Approvals Standard Invocable Actions" documentation, not anywhere near the ConnectApi Orchestration docs where we were originally looking.

The gotcha that will still bite you: field update sequencing

Getting reviewApprovalWorkItem working is not the end of the story. If your orchestration has logic downstream of the approval step — for example, a Decision element that checks a field on the related record (like "does this need Finance approval next?") to determine routing — that field must already reflect the correct value before you call reviewApprovalWorkItem, not after.

Why: the native Work Guide component's "Approve" button doesn't just mark the work item complete — it runs the entire underlying subflow tied to that approval step (in our case, a subflow that included a Decision element, a field update on the related record, and a Slack notification, all before marking the work item done). When you call reviewApprovalWorkItem directly, you bypass all of that subflow logic and only get the equivalent of "mark this work item done." Any Orchestration Decision element gated on your related record's fields will evaluate immediately once the work item is marked complete — using whatever the field's value is at that exact moment, which may still be stale if you haven't updated it yourself first.

Concretely, for us this meant:

apex

// WRONG ORDER — orchestration's Decision evaluates before the field is updated

Invocable.Action action = Invocable.Action.createStandardAction('reviewApprovalWorkItem');

// ...invoke...

opp.Approval_Status__c = 'Pending Finance Approval'; // too late — Decision already ran

update opp;

apex

// CORRECT ORDER

opp.Approval_Status__c = 'Pending Finance Approval'; // set first

update opp;

Invocable.Action action = Invocable.Action.createStandardAction('reviewApprovalWorkItem');

// ...invoke — Decision now evaluates the correct, already-updated value

We only caught this because the orchestration instance showed Status: Completed (successfully!) but the expected next-stage work item never got created — it took querying the FlowOrchestrationInstance and reading the underlying subflow's Decision logic directly to figure out why.

If your orchestration's subflow also sends notifications (Slack, email) as part of that same subflow logic, be aware those will also be skipped when you bypass the subflow via reviewApprovalWorkItem directly — you'll need to replicate any such notification yourself (as a Flow Action or Apex callout) alongside the field update.

Summary checklist if you're building this yourself

  1. Don't use ConnectApi.FlowApprovalProcesses for Orchestration Approval Steps — it's a known, tracked bug (W-23702762) for retrieving Approve/Reject actions.
  2. Don't use classic Approval.process() — wrong object type entirely.
  3. Do use the standard invocable action reviewApprovalWorkItem, called via Invocable.Action.createStandardAction().
  4. Capitalize approvalDecision exactly as "Approve" or "Reject".
  5. Update any fields your orchestration's downstream Decision logic depends on before calling reviewApprovalWorkItem, not after.
  6. Check whether your approval step's native subflow sends any notifications (Slack/email) as part of its own logic — if so, replicate that separately, since bypassing the subflow means bypassing those too.

Hope this saves someone the hours it cost us to piece together!!!

 

#Flow-Orchestration  #Advanced Approvals  #Salesforce_Mobile_App

0/9000

Read this post and watch the video explaining a related-list solution for flow approvals using reactive screen flows. https://salesforcebreak.com/2025/08/12/why-is-everyone-talking-about-salesforce-flow-approvals/

 

If you want to master flow approvals (orchestration-based), I am offering a live course: 

https://flow-canvas.com/flow-approvals-crash-course/

 

 

 

#Flow

2 comentarios
0/9000

I am not getting verification mail of Get a free Developer Edition org with special configuration to complete the Approval Process Management Superbadge Unit.

 

 I tried trying from yesterday but did not receive any verification mail. Please check

 

Name: Mahesh M

 

Registered Mail ID: mah91177@gmail.com

 

TrailBlazer ID : https://www.salesforce.com/trailblazer/mahesh015

 

#Trailhead Challenges  #Trailhead Superbadges

4 respuestas
  1. 13 mar 2025, 17:27

    @Ashwini G For registration, it is recommended to use a Gmail email, and you can choose the USA as the country. 

    If the email still does not arrive within 15 minutes, submit a request to the Salesforce Help Team.

    UPD.  I tried to check myself if the email would arrive. I selected the country Ukraine, email Gmail. The email arrived 49 minutes after registration. 

      

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

0/9000

ISSUE:

 

The Developer Edition with Flow Orchestration is NOT being created by Salesforce.

 

CONTEXT:

 

This is the Trailhead page: https://trailhead.salesforce.com/content/learn/modules/build-a-flow-orchestration/identify-your-steps-and-build-your-flows provides instructions to create a Developer Edition Org with Flow Orchestration.

This is the webform indicated by the Trailhead to Sign up for a free Developer Edition org with Flow Orchestration .

 

I have tried creating the above mentioned Developer Edition with several different email addresses and usernames but it is not sending me the email to confirm the creation of the(se) environment(s).

 

I attempted to create that DE with Flow Orchestrator more than 24 hours ago and I have not received the expected email yet to validate/activate the DE environment (It so probably not being created OR the queued is so huge that it might be created in several months!!!?)

QUESTION:

 

Has anyone found a solution to this issue?

 

#Trailhead Challenges

#Flow-Orchestration

6 respuestas
  1. 25 oct 2024, 10:54

    For the first time, I when populating the web form, I have selected USA as my country (instead of Spain which was the right country) and THIS TIME is has worked and has created the free DE Org with the Flow Orchestrator information to be able to continue with the above mentioned Trailhead.

     

    It looks like the country (USA) may have had an advantage (?) ah ah ah

     

    This issue is now resolved, I got my DE Org.

0/9000