Yes you can call the Apex class from Wrokflow using Outbound message. please follow the steps.
Step 1 : Create the Site in Setup --> App Setup --> Develop --> Sites Step 2 : Create the REST based class using @RestResource(urlMapping='/<<Name>>/*') Step 3 : Provide the class access for the Site created above and provide the objects and class permission for the profile. Step 4 : Copy the URL of the Site including urlmapping of the class. Step 5 : Create Outbound message past the URL Step 6 : Activate the Workflow
// URL for Outbound message
// => http://DomainName/SiteName/services/apexrest/<urlMappingName>/notification
@RestResource(urlMapping='/<Name>/*')
global with sharing class ClassName{
@HttpPost
global static void methodName()
{
// do your logic
}
}
Yes you can call the Apex class from Wrokflow using Outbound message. please follow the steps.
Step 1 : Create the Site in Setup --> App Setup --> Develop --> Sites
Step 2 : Create the REST based class using @RestResource(urlMapping='/<<Name>>/*')
Step 3 : Provide the class access for the Site created above and provide the objects and class permission for the profile.
Step 4 : Copy the URL of the Site including urlmapping of the class.
Step 5 : Create Outbound message past the URL
Step 6 : Activate the Workflow
Testing :
https://workbench.developerforce.com/restExplorer.php
place the URL from
/services/apexrest/<urlMappingName>/notification
the Execute it.
Thanks
Sivasankar
Thanks for your reply,in URL mapping which url need to be given if u had any example please post it.
Site URL :
URL : Site URL/services/apexrest/<urlMappingName>/notification
Thanks
sivasankar
can you please post an example/steps to call apex from process builder direcly?
Thanks,
MK7