Comments (2)
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...
- Workflow metadata type is a container for all WorkflowAlert, WorkflowFieldUpdate, WorkflowKnowledgePublish, WorkflowOutboundMessage, WorkflowRule, WorkflowSend and WorkflowTask meta data types associated with a given object. This metadata type only works with the 'deploy' and 'retrieve' operations (see Salesforce Metadata API documentation).
- WorkflowRule metadata type defines a specific rule and the workflow actions (defined via separate calls to create) linked with it via the WorkflowActionReference type.This metadata type can be used with the 'create' method. Though you must have already created the workflow actions it references.
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.
from apex-mdapi.
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.
thanks very much for your quick response on this!
Sean
from apex-mdapi.
Related Issues (20)
- MetadataServiceExamples outdated
- Test Class For MetadatadeolpyController Class
- Help article to use named credentials with wrapper has been removed HOT 1
- Generate an Apex from WSDL
- GlobalValueSetTranslation HOT 2
- Update search layout task, event, activity HOT 1
- System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element customizeSetup
- Apex Wrapper Metadata API Takes Time to Reflect the Change
- Can't create in production org
- Can't create a sharing rule HOT 2
- GlobalValueSetTranslation
- Can we create ApexClass natively? Any Example? HOT 1
- UserInfo.getSessionId() makes this unusable in packaged code HOT 2
- How do we update multiple profiles at once?
- LightningComponentBundle (LWC): reading/creating/updating
- Creating Apex Trigger
- Creating a MultiPicklist HOT 2
- System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element includeRecordsOwnedByAll
- How To get Picklist Value according to record type for a custom object HOT 3
- Can anyone suggest on how to read the flexipage? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apex-mdapi.