Skip to main content
added 112 characters in body
Source Link

Using Metadata API version 38.0 you can.

These lines downloaded the active version information for my flow:

mConn = new MetadataPortTypeClient("SoapEndPoint", loginResult.metadataServerUrl);
...
...    
readMetadataRequest r = new readMetadataRequest(metadataHeader, null, "FlowDefinition", new string[] { "ChangeProgressFlow" });
readMetadataResponse rs = mConn.readMetadata(r);

If I fetch (retrieve package) the FlowDefinition for my flow, the XML is (the same information I got using readMetadata):

<?xml version="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeVersionNumber>6</activeVersionNumber>
</FlowDefinition>

My flow has 6 versions:

enter image description here

I can fetch the content of each one but the active one (the first in the list).

If I try to get the XML of the active one, the error is:

Entity of type 'Flow' named 'ChangeProgressFlow' cannot be found

To get the content of the active one, my guess is that you have to append "-VERSION" to the name.

Using Metadata API version 38.0 you can.

These lines downloaded the active version information for my flow:

readMetadataRequest r = new readMetadataRequest(metadataHeader, null, "FlowDefinition", new string[] { "ChangeProgressFlow" });
readMetadataResponse rs = mConn.readMetadata(r);

If I fetch (retrieve package) the FlowDefinition for my flow, the XML is (the same information I got using readMetadata):

<?xml version="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeVersionNumber>6</activeVersionNumber>
</FlowDefinition>

My flow has 6 versions:

enter image description here

I can fetch the content of each one but the active one (the first in the list).

If I try to get the XML of the active one, the error is:

Entity of type 'Flow' named 'ChangeProgressFlow' cannot be found

To get the content of the active one, my guess is that you have to append "-VERSION" to the name.

Using Metadata API version 38.0 you can.

These lines downloaded the active version information for my flow:

mConn = new MetadataPortTypeClient("SoapEndPoint", loginResult.metadataServerUrl);
...
...    
readMetadataRequest r = new readMetadataRequest(metadataHeader, null, "FlowDefinition", new string[] { "ChangeProgressFlow" });
readMetadataResponse rs = mConn.readMetadata(r);

If I fetch (retrieve package) the FlowDefinition for my flow, the XML is (the same information I got using readMetadata):

<?xml version="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeVersionNumber>6</activeVersionNumber>
</FlowDefinition>

My flow has 6 versions:

enter image description here

I can fetch the content of each one but the active one (the first in the list).

If I try to get the XML of the active one, the error is:

Entity of type 'Flow' named 'ChangeProgressFlow' cannot be found

To get the content of the active one, my guess is that you have to append "-VERSION" to the name.

Source Link

Using Metadata API version 38.0 you can.

These lines downloaded the active version information for my flow:

readMetadataRequest r = new readMetadataRequest(metadataHeader, null, "FlowDefinition", new string[] { "ChangeProgressFlow" });
readMetadataResponse rs = mConn.readMetadata(r);

If I fetch (retrieve package) the FlowDefinition for my flow, the XML is (the same information I got using readMetadata):

<?xml version="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeVersionNumber>6</activeVersionNumber>
</FlowDefinition>

My flow has 6 versions:

enter image description here

I can fetch the content of each one but the active one (the first in the list).

If I try to get the XML of the active one, the error is:

Entity of type 'Flow' named 'ChangeProgressFlow' cannot be found

To get the content of the active one, my guess is that you have to append "-VERSION" to the name.