SAP / ssi-dim-middle-layer

Integration layer between DIM solution and Tractus-X Portal.
Apache License 2.0
2 stars 2 forks source link

Retrigger endpoint returns "process step is not eligible" error #111

Open thackerronak opened 1 month ago

thackerronak commented 1 month ago

Description:
The retrigger endpoint (POST /api/dim/process/wallet/{processId}/retrigger?processStepTypeId={processStepTypeId}) is returning an error stating that the process step is not eligible to run, even though the step has failed and needs to be retriggered.


Steps to Reproduce:

  1. Obtain an active processId and failed processStepTypeId via the following endpoint:

    POST /api/dim/process/setup?bpn={bpn}&companyName={companyName}
    • bpn: Business Partner Number of the company.
    • companyName: Name of the company.

    In the response, you will get the processId and the processStepTypeId of the TODO step.

Screenshot 2024-10-09 at 2 49 22 PM

  1. Use the retrigger endpoint to attempt retriggering the failed step:
    POST /api/dim/process/wallet/{processId}/retrigger?processStepTypeId={processStepTypeId}
    • processId: b56f4766-26e0-4751-b342-de9677198e90
    • processStepTypeId: RETRIGGER_CREATE_STATUS_LIST

Screenshot 2024-10-09 at 2 49 42 PM

  1. Observe the error in the response:
    Error: processId b56f4766-26e0-4751-b342-de9677198e90, process step CREATE_STATUS_LIST is not eligible to run

Expected Behavior:

The retrigger endpoint should allow retriggering a failed process step, especially when the step has been marked as failed in the setup process.

Actual Behavior:

The API returns an error stating that the step is "not eligible to run."

Phil91 commented 2 weeks ago

@thackerronak could you please verify that the fix solves your bug and if so close the issue? :)