0

I would like to create a public Design Automation Activity and Package so other Forge apps with unknown ClientId & Secret can use our corporate DA tools. So I am setting the isPublic: true flag on the payload but, to my great despair, isn't working.

Take a look at my POST activity payload below:

const activityParams = {
  id: DA_ACTIVITY_ID,
  commandLine: [ 
    `$(engine.path)\\accoreconsole.exe ` +
    `/i \"$(args[inputDwg].path)\" ` + 
    `/al \"$(appbundles[${DA_APP_BUNDLE_ID}].path)\" ` + 
    `/s \"$(settings[script].path)\"` 
  ],
  parameters: {
    inputDwg: {
      description: "input .dwg",
      localName: "input.dwg",
      ondemand: false,
      required: true,
      verb: "get",
      zip: false
    },
    result: {
      description: "result .json",
      localName: "result.json",
      ondemand: false,
      required: false,
      verb: "put",
      zip: false
    }
  },
  settings: {
    script: "(command \"EXTRACTGEOBIMDATA\")\n"
  },
  description: "GeoBIM Extract Data",
  engine: DA_ENGINE,
  appbundles: [
    fullAppBundleId
  ],
  isPublic: true
}

The first thing I notice is that the response after successful creation of activity doesn't contain the isPublic field:

enter image description here

The second thing I'm forced to notice is that attempting to execute a workitem against that activity result in an error:

enter image description here

Note that when run with the same credentials the activity and workitem are running perfectly fine.

halfer
  • 19,824
  • 17
  • 99
  • 186
Felipe
  • 4,325
  • 1
  • 14
  • 19
  • 1
    `isPublic` is a DA V2 feature, it is not available in V3, You need to share the activity with everyone. That's the new workflow but we allow 0 public shares by default. https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/shares-GET/ – Madhukar Moogala Mar 22 '21 at 13:27
  • Thanks Mate, how do you actually get to create a share between forge apps then? I just see a GET endpoint there? – Felipe Mar 22 '21 at 15:10

2 Answers2

2

Design Automation V3 let you use individual alias to share an Activity or AppBundle with a specific forge app.

If you look at the documentation when creating an alias for activity and AppBundle, there is an optional parameter you can set in the request body named "receiver". You can specify a forge app client id or nickname if the forge app you want to share with have one setup in Design Automation.

Note that if the Forge app you want to set as receiver use a nickname, you must use that nickname instead of the app client id.

https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/activities-id-aliases-POST/ https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/appbundles-id-aliases-POST/

Jeremy
  • 357
  • 1
  • 6
  • 1
    Please note today we only support specifying a single receiver per alias – Madhukar Moogala Mar 23 '21 at 14:13
  • Thanks, the Forge documentation would deserve a bit more love and clarity: I need some kind of degree to understand that "receiver:string - The user to share the alias with." actually means "Forge app you want to set as receiver. If it uses a nickname, you must use that nickname, otherwise use the app clientId." – Felipe Mar 31 '21 at 11:28
0

We don't currently allow people to create public activities. This is because it is not clear how the parties could establish a trust relationship necessary. It sounds like in your scenario the sharing would happen within the same org. Would they have the same email domain (eg. xyz@somecompany.com would share with bla@somecompany.com)?

Albert Szilvasy
  • 461
  • 3
  • 5
  • not at all, we were hoping we could deploy some corporate activities and associated bundles that our customers could leverage when running our web services performing DA jobs while providing their own Forge credentials ... it sounds like a pretty bad news actually. Is it the same with AppBundles? Thanks – Felipe Mar 22 '21 at 15:07
  • Yes, AppBuncles the same. Again, the reason we don't allow this because we are worried that a public appbundle/activity could hurt its users. – Albert Szilvasy Mar 22 '21 at 15:50
  • The workaround today, is to create an alias per customer you want to share your activity/appbundle with and share it with individual customer forge app key/nickname by setting the receiver parameter. – Jeremy Mar 22 '21 at 16:35
  • Could you please point to a bit more concrete documentation on how to achieve that exactly? I get the alias part but the sharing & setting the receiver parameter part is quite obscure to me. Also, as per my question above, how do you actually get to create a share between forge apps then? I just see a GET endpoint there: https://forge.autodesk.com/en/docs/design-automation/v3/reference/http/shares-GET/. Thanks. – Felipe Mar 23 '21 at 12:17