- edited description
I’ve just started playing around with Apex Dataweave, and I’ve stumbled upon two issues.
a) In a Developer Release Preview org (hosted on GS0 instance), the IC2 menu option to create a new Dataweave Script is available, and works as expected - a new dw folder is added with the script and xml file.
However, when trying to deploy via Save, nothing happens. When trying to deploy via Deploy All, the file is not detected as a candidate.
b) In any other, non-prerelease Developer org I’ve tried, the menu option appears but is greyed out.
I’ve also tried to deploy the script using SFDX force:mdapi:deploy
command which executed successfully, and I was able to run the script in Apex.
Hi. First, please make sure that you’re on the latest build of IC2. Note that in pre-Spring '23 orgs, the DataWeaveInApex
feature must be explicitly enabled resulting in the DataWeave
namespace and DataWeave.Result/Script
types in the OST. If those are not present, you’ll see the New > DataWeave Script option as disabled. In Spring '23 orgs, that explicit feature enablement is no longer necessary. If necessary, regenerate your OST and confirm that you see that namespace and the associated classes in the OST:
Also make sure that IC2 has the latest list of metadata from the org using the Refresh toolbar button or the Update now link as DataWeaveResource
is a new metadata type with this feature:
With those steps, I’m able to work with DataWeave scripts in both Winter ‘23 and Spring '23 orgs. Please let me know if you don’t see the same.
@Scott Wells I’ve done the following:
DataWeaveResource
I’m using v2.2.5.6
I’ve also tried completely deleting the project and starting from scratch and there’s no difference.
Hi. Can you please enable debug logging for both Metadata Deployment and Salesforce DX, reproduce the behavior, and attach the resulting idea.log
file for review?
Okay, the latest provided information helped. Evidently the metadata describe information returned for this type by the Metadata API is incomplete and doesn’t include the dw
metadata file suffix. That prevented it from deploying properly in a metadata format project, though it’s fine in a source format project because evidently the Salesforce CLI already included a workaround for this.
I’m implemented a fix for this malformed API response to be included in tomorrow’s build of IC2. In the interim, it should work properly in a source format project. I’ll also let the person responsible for this feature at Salesforce know about the issue so that it can be resolved properly in the API response.
Delivered in 2.2.5.7.
Okay, the latest provided information helped. Evidently the metadata describe information returned for this type by the Metadata API is incomplete and doesn’t include the
dw
metadata file suffix. That prevented it from deploying properly in a metadata format project, though it’s fine in a source format project because evidently the Salesforce CLI already included a workaround for this.I’m implemented a fix for this malformed API response to be included in tomorrow’s build of IC2. In the interim, it should work properly in a source format project. I’ll also let the person responsible for this feature at Salesforce know about the issue so that it can be resolved properly in the API response.