Skip to Content
0

Workflow not working when BO is created through webservice

Jan 28 at 12:13 PM

70

avatar image

I have a custom BO with 1 level approval workflow and everything was working great.

then requirements changed and the BO instances now are created from android application using SOAP webservices generated from the ByD.

the problem is the field "ApprovalStatus" is emtpy and cannot be edited through code because it is read only field so the approval workflow is not working now.

is there a solution for that ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Knut Heusermann
Jan 31 at 12:47 PM
0

Hi Haitham,

typically status fields are not entered, but show the result of an BO action. Using the web service wizard in the SAP Cloud Applications Studio you can create interface operations to trigger BO actions as well. Therefore I think the solution would be to trigger the approval by invoking the corresponding BO action via web service.

Regards,
Knut

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Knut,

Thank you for replying but i dont think i can understand what do u really mean.

there is no BO action for initializing the ApprovalStatus field. there are actions for CRUD operations, submit for approval, approve and reject but they dont work because field approval status is empty and i cant give it value in the create operation.

Can you please give me a clear example what i should do to create BO instance from webservice with approvalstatus field = 1 ?

0
Meghna Sharma Jan 31 at 07:12 AM
0

Hello,

Do you know why the ApprovalStatus field is empty? How are you filling that field? Is it from the web service or through some code?

Thanks & Regards,

Meghna

Show 1 Share
10 |10000 characters needed characters left characters exceeded

ApprovalStatus is a standard read only field automatically added when i create approval process on my business object.

usually when i create a new instance from my BO using New button in OWL it takes initial value "1" then when i press "Submit for Approval" the workflow starts and status changes after approval or rejection.

But when i create instance of that BO using absl code or from webservice the ApprovalStatus field is emtpy and "Submit for Apporval" button is disabled. the field is read only so i cant change it with my absl logic

0
Meghna Sharma Feb 20 at 06:09 AM
0

Hello Haitham,

Status fields are generally not enabled for editing directly but you can obviously change that by using the appropriate actions. You need to trigger the same action from absl code which gets triggered when you press "Submit for Approval" button for that BO instance, that will change the approval status. Hope it helps.

Thanks & Regards,

Meghna

Share
10 |10000 characters needed characters left characters exceeded
John Meadows
Feb 20 at 10:11 AM
0

HI all

This is a known problem with custom approval processes and custom BO. I have raised it with SAP about 12 months ago

https://influence.sap.com/sap/ino/#/idea/141009/?section=sectionVotes

Share
10 |10000 characters needed characters left characters exceeded