I am trying to get a list of workflows created over several objects through Metadata API.

When i call the readMetadata() of MetadataService class, I got this exception:

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element fullName

During debugging i found out that several of these objects have FlowTriggers set up for them.When i removed those FlowTriggers it started working again.

i'm invoking the readMetadata() as follows:

 MetadataService.ReadWorkflowResult result = (MetadataService.ReadWorkflowResult)service.readMetadata('Workflow',objectNames);

As the things are set up its hard for me to change the type to any other value. So the Metadata API even support the flow triggers or is there any workaround of this issue??

  • 1
  • Thanks @PrabhatKumar I have already looked into that and one statement that i found state that "The Process Builder has superseded flow trigger workflow actions, formerly available in a pilot program. Organizations that are using flow trigger workflow actions can continue to create and edit them, but flow trigger workflow actions aren’t available for new organizations." is that what you want to point out?? – Mr.Frodo Nov 14 '15 at 13:53
  • Yes @mr.frodo i wanted to point the same. – MIX DML Nov 14 '15 at 14:02
  • @PrabhatKumar Again looking at this link i find some more information.link.It states that Test mode for flow triggers isn’t supported in the Metadata API. If you want a flow trigger to run the latest flow version when an administrator causes the workflow rule to fire, enable test mode via the user interface after deployment. Is it relevant?? – Mr.Frodo Nov 14 '15 at 14:09
  • @PrabhatKumar Again it will be great if there is any workaround of this issue rather moving forward with Process builder. – Mr.Frodo Nov 14 '15 at 14:18

I'm not sure this is right way to solve the issue but i have done following changes in MetadataService class and things started working for me. I added fullName variable in WorkflowFlowAction class of MetadataService.

public String fullName;
private String[] fullName_type_info = new String[]{'fullName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};

One more thing i want to make clear here that i updated my MetadataService class with latest 35.0 version but that didn't solve my issue.Please suggest me if there is any other way to solve the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.