I tried to create a custom policy and use it with SwitchYard. According to LocalExchangeBus there is a 'generic-policy' handled by PolicyHandler. Security and transaction policies have its own handlers. Unfortunately when I try to deploy an application with the custom policy then the deployment fails with the exception 10:19:59,905 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-12) MSC000001: Failed to start service jboss.deployment.unit."implementations-component-test.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."implementations-component-test.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: java.lang.Exception: Invalid policy name: 'good' doesn't exist. Caused by: org.switchyard.exception.SwitchYardException: java.lang.Exception: Invalid policy name: 'good' doesn't exist. Caused by: java.lang.Exception: Invalid policy name: 'good' doesn't exist. I think this is caused by the implementation of PolicyFactory that has a static constructor that loads policies from SecurityPolicy and TransactionPolicy enums so I am not able to add additional policy.
Yup.
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1502 pushed
Created attachment 809303 [details] modified switchyard-quickstart-bean-service containing definidtion of 2 custom policies (interaction|implementation) Verified in FSW 6.0.0.ER4 with attached (modified) switchyard-quickstart-bean-service project.
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1502 to Closed