-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflow elements do not extend metadata class #19
Comments
I have added support for the Workflow metadata types, take a look at the latest MetadataService.cls. Your code will now compile. Keep in mind as per the blog post linked in the read me the handling of AsyncResult. Also keep in mind the following...
Depending on how complex a Workflow Rule you want to create you may want to wait for the Spring'14 rollout and for me to update this library. Since this version of the API will support an immediate version of the 'create' operation which does not require you to handle the AsyncResult (as per the blog linked in the readme). In this case, you can issue one create call after another to create your required actions and then finally a Workflow Rule to link them together. That said if your still in a rush, i can try and do you an example using the existing 'create' method. If you let me know the minimal example you would need in terms of the type of workflow actions your use case needs. If your not in a rush, i will do an example using the new 'create' method sometime mid-March once the platform release has completed it's rollout. |
Thanks Andrew, your library has been a big help. We're going to go foreward with the library the series of calls (for the WorkflowTask and WorkflowRule), with some polling of the asyncResponse in the middle. This is working for us on a small scale now. I am going to experiment today with using the "MetadataCreateJob" library to manage the dependent objects. In our case we'll have about 100 pairs of Tasks and Rules; I'll see how that volume fits into the list of Items that are bundled together. |
Hi,
I am trying to create "workflow" metadata via the wrapper. I'm having trouble adding the "fullName" attribute to the parent workflow and its child elements
code like this:
((MetadataService.metadata)myWorkflow).fullName = source.subject;
produces this error:
Error: Compile Error: Incompatible types since an instance of MetadataService.Workflow is never an instance of MetadataService.Metadata at line xyz
The attempt to create workflow fails with a similar type error.
MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { myWorkflow});
that line fails with an error saying that the method is expecting a metadata object.
The text was updated successfully, but these errors were encountered: