Skip to content

Commit

Permalink
Merge pull request #768 from Uniplore-X/pr-feat-dynamic-script-activi…
Browse files Browse the repository at this point in the history
…ties

Major feature: add dynamic script activities the forth way to extend the functionality of the robot
  • Loading branch information
skadefro authored Aug 30, 2023
2 parents c8bf896 + c3e7d7e commit 5337452
Show file tree
Hide file tree
Showing 16 changed files with 919 additions and 3 deletions.
12 changes: 10 additions & 2 deletions OpenRPA.Script/Activities/InvokeCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,23 @@ public static void ExecuteNewAppDomain(string code, Action<string> action)
}
private static bool python_doinit = true;
protected override void Execute(CodeActivityContext context)
{
var code = Code.Get(context);
var language = Language.Get(context);
Execute(context, code, language, Arguments, PipelineOutput);
}

public void Execute(CodeActivityContext context, string code, string language, Dictionary<string, Argument> Arguments,
OutArgument<Collection<System.Management.Automation.PSObject>> PipelineOutput)
{
string currentdir = System.IO.Directory.GetCurrentDirectory();
try
{
System.IO.Directory.SetCurrentDirectory(Interfaces.Extensions.ProjectsDirectory);


var code = Code.Get(context);
var language = Language.Get(context);
//var code = Code.Get(context);
//var language = Language.Get(context);
var variables = new Dictionary<string, Type>();
var variablevalues = new Dictionary<string, object>();
if (Arguments == null || Arguments.Count == 0)
Expand Down
Loading

0 comments on commit 5337452

Please sign in to comment.