Get assets

Hello all.
I am trying to get assets and credentials from orchestrator.
I’ve declared the values in config file.
image

When I run the process from studio it’s working fine.
But when I publish and add process in orchestrator . It says the asset is missing.


Can someone help me with this?

in orchestrator,
top one should be called SAP Readiness Check
2nd one should be called SAPConnectionName

They should match the values circled here

1 Like

Hello in the Asset creation in orchestrated you don’t to need to use config(””).To string in the asset name. It should be used in the flow while getting the asset.

So asset names you can add as it is as in 2nd column in the config file(your first screenshot). Remove those Config(””).ToString, then it will work

1 Like

I’ll correct it and let you know. :face_with_hand_over_mouth:
Thank you. @jack.chan

1 Like

That becomes hard coded right?

No…i mean in the second screenshot which you shared… I hope that is the screen shot of the Asset page. Inside that you need to provide the Name alone and Config(””).Tostring not required

1st screenshot - Config file
2nd screenshot- Orchestrator asset(here you need to change)
3rd screenshot- workflow

1 Like

Name of Asset in Orchestrator: MyAsset
Name in config file: Whatever Name
Value in config file: MyAsset

Credential/Asset name in activities: Config(“Whatever Name”).ToString

Config(“Whatever Name”).ToString returns MyAsset so it gets the Asset named MyAsset.

2 Likes

Hi @postwick .
This is how I am trying.



Let me know if any corrections required.

Hi @Rahul_Unnikrishnan
I tried this way. Its working.


Here instead of hard coding the asset name name you can use, Config(AssetName).ToString

Replace AssetName with name which you configured in the config file.

Replace “SAPEccCredentials” with Config(“ECC Credintails”).ToString

(Note that you misspelled Credentials and I’m using your misspelled version.)

Replace SAPConnectionName with Config(“ECC Connection Name”).ToString

You don’t use the asset name inside config. You use the NAME from the Config file. Each entry in the Config file has a name and value. Config is a dictionary ie name/value paris.

For example, the name “ECC Connection Name” has value SAPConnectionName so Config(“ECC Connection Name”).ToString returns SAPConnectionName.

1 Like

image

These are the only assets I have created.

But when I use Config(“what ever”).Tostring in get assets and get credentials. I am getting this

In normal sequence it’s working fine. But in flow chat I have this issue.

Here the first screenshot is the Asset page… There you declared an Asset name.

In the config file you have Name and Value column. So the asset name which you created in the orchestrator needs to add to the Value column and you need to provide a Name in the config( suppose “FirstVal” is the name(key)and “SAP readiness check Credential” is the value in the config file(value). So it’s a dictionary.

You have to use Config(”FirstVal”).ToString in the get asset activity.

I hope this will give you more clarity. You can see Config file(Excel), orchestrator Asset and Get Credntial activity.

You don’t name your assets with Config etc. Config(“”) is how you retrieve name/value pairs from the config file.

The asset names in Orchestrator need to match the VALUE column from the config file.

No. If you use the Assets sheet, it automatically gets the value from the asset and puts it into the Config dictionary. You don’t need the Get Asset activity in that case.

But you can’t do that for credentials.

He is using the regular Settings sheet that gives the NAME of the asset, and you use THAT in your Get Asset.

In your config sheet you have NAME “ECC Connection Name” and VALUE “SAPConnectionName”
so if you use Config(“ECC Connection Name”).ToString in your code it gives you the string SAPConnectionName.

So when you put Config(“ECC Connection Name”).ToString into your Get Credentials activity, it gets the credentials from the Asset named SAPConnectionName.

He is trying to get the credential and the screenshot which I provided is for getting it using Get Credential activity as in the screenshot.