ericabouaf/aws-swf

Code does not allow you to set activity type and version.

iamnewspecies opened this issue · 0 comments

The code which lets you set the activity type and version looks more like a hack.
https://github.com/neyric/aws-swf/blob/master/lib/decision-response.js#L169

The code should be like, if sometthing is not there then it should set default value. Else it should take what value is supplied. Currently it sets value only if the first parameter does not contain the key "activity".

if(!swfAttributes) {
if(scheduleAttributes.activity) {
ta.activityType = scheduleAttributes.activity;
}
if (typeof ta.activityType === "string") {
ta.activityType = { name: ta.activityType, version: "1.0" };
}
}