cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow not working when BO is created through webservice

former_member545775
Participant
0 Kudos

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 ?

Accepted Solutions (0)

Answers (4)

Answers (4)

JohnMeadows
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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

knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

former_member545775
Participant
0 Kudos

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 ?

Former Member
0 Kudos

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

former_member545775
Participant
0 Kudos

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