Sorry, that code I was using above was pulled from an older sample that wasn’t working, that’s my mistake.
SPEnvironment isn’t an InArgument or OutArgument so you don’t actually need the context to get or set it. Instead, you should be able to do “SPEnvironment.ToString()” and that will return either “Online” or “OnPrem”.
Here’s some of the most recent activity code:
public enum fileType
{
CSV,
TAB,
XML,
Excel
}
...
[Category("Input")]
[RequiredArgument]
[Description("Output file type for report results.")]
public fileType ReportFileType { get; set; }
...
protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state)
{
...
//Add it to a dictionary
dict.Add("ReportFileType", ReportFileType.ToString());
...
}