{"id":18483360,"url":"https://github.com/guidesmiths/worksmith_rascal","last_synced_at":"2025-05-13T20:26:53.187Z","repository":{"id":33480352,"uuid":"37126087","full_name":"guidesmiths/worksmith_rascal","owner":"guidesmiths","description":"Rascal activities for worksmith","archived":false,"fork":false,"pushed_at":"2023-12-06T14:28:29.000Z","size":449,"stargazers_count":0,"open_issues_count":13,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-19T20:24:57.808Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guidesmiths.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-09T10:37:57.000Z","updated_at":"2021-10-03T10:59:26.000Z","dependencies_parsed_at":"2024-11-06T12:42:02.757Z","dependency_job_id":"24f631f2-ba6f-4908-9341-9d3e4ffb8ca3","html_url":"https://github.com/guidesmiths/worksmith_rascal","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":0.5,"last_synced_commit":"0e8e3b17c7e9d2f0b9e5d525e730fa2a2f547a19"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidesmiths%2Fworksmith_rascal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidesmiths%2Fworksmith_rascal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidesmiths%2Fworksmith_rascal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidesmiths%2Fworksmith_rascal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidesmiths","download_url":"https://codeload.github.com/guidesmiths/worksmith_rascal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020810,"owners_count":22000785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-06T12:35:26.491Z","updated_at":"2025-05-13T20:26:53.068Z","avatar_url":"https://github.com/guidesmiths.png","language":"JavaScript","readme":"# worksmith_rascal\n\n[Rascal](http://npmjs.com/package/rascal) activities for [worksmith](http://npmjs.com/package/worksmith)\n\nThis package contains the following activities/tasks:\n\nname | description\n--- | ---\n[publish](#publish-activity) | Publishes a message a rascal publication\n[receiveOne](#receiveone-activity) | Receives a message from a rascal publication\n\n### publish activity\nPublish as message to a rascal publication\n##### params\nname | type | description\n--- | --- | ---\nbroker | Rascal Broker | Will look in context.broker if not specified\npublication | Publication id | Where to send the message\npayload | The payload to publish\nroutingKey | Routing key to use when publishing the message. Will override the routing key defined in the publication\noptions | Other publication options (see rascal documentation)\n\n##### example\n\n```javascript\nvar worksmith = require('worksmith')\nworksmith.use('rascal', require('worksmith_rascal'))\nvar workflow = worksmith({task:\"sequence\", items : [{\n    task:'rascal/publish',\n    broker: '@broker',\n    publication: 'p1',\n    payload: 'test message',\n    resultTo: 'messageId'\n}])\n```\n\n\n### receiveOne activity\nReceives exactly one message from a subscription within a given timeout.\nCauses an error if no message could be received.\n\nWhen a message is received the result is `{ message: rabbitMsg, content: parsed\u003cmessage.content\u003e }`\n\n##### params\nname | type | description\n--- | --- | ---\nbroker | Rascal Broker | Will look in context.broker if not specified\nsubscription | Subscription id | Rascal subscription name to receive from\ntimeOut | milliseconds | amount of time to wait for a message\noptions | Other subscription options (see rascal documentation)\n\n##### example\n\n```javascript\nvar worksmith = require('worksmith')\nworksmith.use('rascal', require('worksmith_rascal'))\nvar workflow = worksmith({task:\"sequence\", items : [{\n    task:'rascal/receiveOne',\n    broker: '@broker',\n    subscription: 's1',\n    resultTo: 'message'\n}])\n```\n\n### Running tests\nYou need an rabbitmq server running on localhost:5672 for the tests to pass. If you have docker and docker-compose installed simply run ```docker-compose up``` in the route of this project.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidesmiths%2Fworksmith_rascal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidesmiths%2Fworksmith_rascal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidesmiths%2Fworksmith_rascal/lists"}