Giter Club home page Giter Club logo

Comments (4)

sfmskywalker avatar sfmskywalker commented on August 10, 2024

Can you elaborate on the broken dashboard part? What do you see? A screenshot might help. And perhaps there is a stack trace you can share?

from elsa-designer.

guido-dimasi avatar guido-dimasi commented on August 10, 2024

just a blank page.
on the browser console i've this message : The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.

the problem is that i've make a mistake writing the last node expression, but i've no clue of what error is.

in another attempt im now writing this expression "OK: " + Activities.CreaAsset.Asset.Id (javascript expression)
the debug console show this:
Elsa.Exceptions.WorkflowException: Error while evaluating JavaScript expression ""OK :" + Activities.CreaAsset.Asset.Id". Message: Activities is not defined
at Elsa.Expressions.WorkflowExpressionEvaluator.EvaluateAsync(IWorkflowExpression expression, Type type, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken)
at Elsa.Extensions.WorkflowExpressionEvaluatorExtensions.EvaluateAsync[T](IWorkflowExpressionEvaluator evaluator, IWorkflowExpression1 expression, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken) at Elsa.Activities.Http.Activities.WriteHttpResponse.OnExecuteAsync(WorkflowExecutionContext workflowContext, CancellationToken cancellationToken) at Elsa.Services.ActivityInvoker.InvokeAsync(WorkflowExecutionContext workflowContext, IActivity activity, Func2 invokeAction)"

after that it also broke the page as the previous attempt

from elsa-designer.

guido-dimasi avatar guido-dimasi commented on August 10, 2024

this is the project
TestElsa2.zip

it contains:

  • EF context for the ELSA tables
  • EF context for my business logic persistance
  • 2 custom activities (create, delete)

from elsa-designer.

guido-dimasi avatar guido-dimasi commented on August 10, 2024

i've tried to make the workflow in code:
public class InserimentoAssetWorkflow : IWorkflow { public void Build(IWorkflowBuilder builder) { builder .StartWith<ReceiveHttpRequest>( x => { x.Method = HttpMethod.Post.Method; x.Path = new Uri("/prova", UriKind.Relative); x.ReadContent = true; } ) .Then<SetVariable>( x => { x.VariableName = "Document"; x.ValueExpression = new JavaScriptExpression<ExpandoObject>("lastResult().Body"); } ) .Then<CreaAsset>( x => { x.Name = "CrazioneAsset"; x.Codice = new JavaScriptExpression<string>("Document.Codice"); x.Descrizione = new JavaScriptExpression<string>("Document.Descrizione"); x.Dealer = new JavaScriptExpression<string>("Document.Dealer"); } ) .Then<WriteHttpResponse>( x => { x.Content = new LiquidExpression<string>( "OK. ID: {{ Activities.CrazioneAsset.Asset.Id }} inserito correttamente. " ); x.ContentType = "text/html"; x.StatusCode = HttpStatusCode.OK; x.ResponseHeaders = new LiteralExpression("X-Powered-By=Elsa Workflows"); } ); } }

the output console write:
Elsa.Exceptions.WorkflowException: Error while evaluating Liquid expression "OK. ID: {{ Activities.CrazioneAsset.Asset }} inserito correttamente. ". Message: Object reference not set to an instance of an object. at Elsa.Expressions.WorkflowExpressionEvaluator.EvaluateAsync(IWorkflowExpression expression, Type type, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken) at Elsa.Extensions.WorkflowExpressionEvaluatorExtensions.EvaluateAsync[T](IWorkflowExpressionEvaluator evaluator, IWorkflowExpression1 expression, WorkflowExecutionContext workflowExecutionContext, CancellationToken cancellationToken)
at Elsa.Activities.Http.Activities.WriteHttpResponse.OnExecuteAsync(WorkflowExecutionContext workflowContext, CancellationToken cancellationToken)
at Elsa.Services.ActivityInvoker.InvokeAsync(WorkflowExecutionContext workflowContext, IActivity activity, Func2 invokeAction)

so i'm thinking i'm writing something wrong but i've no clue of what.

from elsa-designer.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.