function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Neil1232Neil1232 

Call apex webservice from workflow rule

I'm writing an app (managed package) and I would like customers to be able to use outbound messaging tasks in workflow to kick off code within my apex managed package. I would create apex webservices, provide the end point URLs and the customer can then create nifty workflow rules which integrate with my app.

 

But it doesnt work.. Anyone got any ideas? Thanks!

 

My code

 

global class MyWebservice {
   webservice static void myFunction(Id idParam){
         System.debug('OUTBOUND MESSAGE RECEIVED!');
   }
}

My workflow

Endpoint url: https://na9-api.salesforce.com/services/Soap/class/thdev/MyWebservice

Send session id: true

 

The error

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session