YouTube: not published yet · Length: 4:50 · Feature: OrchardCore.Scripting (Scripting)
A video for module and theme authors. It shows how the Scripting module evaluates a script by its prefix, where scripts
run (recipes, workflows, layer rules and external logins), which methods a script can call, and how to add a method of
your own. It then shows how to evaluate a script from C# and how to limit what a script can do. The title,
description, tags and chapters YouTube shows are in video.json.
Most of the video is slides with code taken from the Orchard Core source. One clip is recorded in the browser: the Script Task and the JavaScript syntax of a workflow, in the sample workflow that ships with Orchard Core.
The video is recorded on a fresh site with the sample data that ships in the Orchard Core source, so it needs no
mask script. recording-plan.md has every action of the clip, and OPEN-QUESTIONS.md the points to check on a running
site.
-
Build
src/OrchardCore.Cms.Webof OrchardCore and run it withORCHARD_APP_DATApointing at an empty folder outside both repositories, onhttp://localhost:5010, provisioned by Auto Setup (the Blog recipe, site name Orchard Core, time zoneAmerica/Los_Angeles, useradmin, emailadmin@example.com). -
Seed the site: sign in, open Tools, Recipes, and run Workflow Variables Samples. It enables Workflows and HTTP Workflows Activities and creates the workflow Sample: order total.
-
Sign the recorder in, and copy the site's
App_Datafolder andstate.jsonaside:cd .agents/skills/orchardcore-video-producer/scripts/recorder dotnet build -c Release -p:VideoScenes=<repo>/videos/scripting-javascript/recorder export VIDEO_ROOT=<repo>/videos/scripting-javascript VIDEO_BASE_URL=http://localhost:5010 VIDEO_USER_NAME=admin VIDEO_PASSWORD=<password> <bin>/Recorder setup
-
Narrate and record:
scripts/narrate.py videos/scripting-javascript, thenRecorder record 03-workflow. Only03-workflowis a recording; the other chapters are slides drawn byslides.py. The designer saves a draft as it goes, so restore the copy ofApp_Databefore every new take.