Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Sep 7, 2017
1 parent ae7f67e commit b83ecfb
Showing 1 changed file with 9 additions and 68 deletions.
77 changes: 9 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language-salesforce [![Build Status](https://travis-ci.org/OpenFn/language-salesforce.svg?branch=master)](https://travis-ci.org/OpenFn/language-salesforce)
===================

Experimental Salesforce Language Pack for OpenFn
Salesforce Language Pack for OpenFn

Intent
------
Expand All @@ -26,75 +26,16 @@ inject the functions in.
For example:

```javascript
steps(
describe('vera__Test_Event__c'),

create('vera__Test_Event__c', {
vera__Test_Event_Name_Unique__c: "hello from jsforce"
}),

create('vera__Boat__c', {
Name: "Catatafish redux!",
vera__Test_Event__c: reference(0)
})
)
describe('vera__Test_Event__c'),
create('vera__Test_Event__c', {
vera__Test_Event_Name_Unique__c: "hello from jsforce"
}),
create('vera__Boat__c', {
Name: "Catatafish redux!",
vera__Test_Event__c: reference(0)
})
```

Despite this being valid Javascript, it has no knowledge of runtime
dependencies - such as external libraries, configuration etc.

When compiled, an expression may look something like this:

```js
import { execute, describe, create, upsert, reference, steps } from './src/adaptor';

execute({
connectionOptions: {
accessToken: "xxxx"
},

credentials: {
username: 'foo',
password: 'bar',
securityToken: "baz"
}
},
steps(
describe('vera__Test_Event__c'),

create('vera__Test_Event__c', {
vera__Test_Event_Name_Unique__c: "hello from jsforce"
}),

create('vera__Boat__c', {
Name: "Catatafish redux!",
vera__Test_Event__c: reference(0)
})
)

);
```

By using this convention we can maintain a very clean separation of concerns.
And an important extension of that, produce runtimes that can be debugged
and tested with relative ease.


Building an expression
----------------------

Expressions can be transformed into executable scripts using the CLI.

`echo 'field(key,value)' | language-salesforce-build`

The above command returns a compiled and wrapped expression ready for
execution in node.js.

Executing a build
-----------------



API
---

Expand Down

0 comments on commit b83ecfb

Please sign in to comment.