ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 4 replies, has 4 voices, and was last updated by  mfejczaruk 6 months, 2 weeks ago.

  • Creator
    Topic
  • #5475

    Nikita Petrov
    Participant

    To perform feedback from BPM to OroCRM I need to transit workflow item for opportunity entity to next step via api. To do this I need to know ID of workflow item associated with opportunity entity because of requirements of API method:

    /api/rest/{version}/workflow/transit/{workflowItemId}/{transitionName}

    To get workflow item ID I tried to get this information by call get opportunity method:

    /api/rest/{version}/opportunities/{id}

    For my test opportunity I’ve got this result (for debug I switched off WSSE authentication):

    Result of call says me that no workflow item associated with my opportunity entity, but I know that is not right:

    screenshot

    ID of associated workflow entity is 97. How can I get this via API to perform transit?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #5481
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, Nikita.

    Probably, there are no easy answer to your question. We need to refactor entities API so they return relation information (workflow item ID, workflow step ID etc), and need to create API method that will return workflow item information not only by workflow item ID, but also by class + identifier.

    For now you can implement your API method in your bundle to proxy WorkflowManager::getWorkflowItemByEntity into API. We would really appreciate if you’d do pull request to WorkflowBundle with this method. :)

    #5496

    Nikita Petrov
    Participant

    Yevhen, thank you. I will try.

    #34336

    roldan
    Participant

    Hi,

    Is there any news about getting workflowItem and workflowStep through API?
    I’m using ApiEntityManager::getSerializationConfig() to set the fields that cget will return but cannot add workflowItem there because I get 500 error.

    Thanks,
    Matias

    #34401

    mfejczaruk
    Participant

    Hello,
    Please provide logs and environment information so we can see where’s the problem.
    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.