# Question about Suspendible Workflow example

**URL:** <https://forum.dfinity.org/t/question-about-suspendible-workflow-example/8209>\
**Category:** Developers\
**Created:** [October 28, 2021, 11:39pm UTC](https://forum.dfinity.org/t/question-about-suspendible-workflow-example/8209 "2021-10-28T23:39:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hazel](https://avatars.discourse-cdn.com/v4/letter/h/e56c9b/32.png) [@Hazel](https://forum.dfinity.org/u/Hazel)\
**Post date:** [October 28, 2021, 11:39pm UTC](https://forum.dfinity.org/t/question-about-suspendible-workflow-example/8209/1 "2021-10-28T23:39:21Z")

</div>

I stumbled across [this](https://github.com/dfinity/motoko/blob/76a507bc2171f109770d867ae9e1376231e48d3c/samples/pa_cars.mo) which contains a neat pattern I could currently use. However I’m getting  
` type error [M0077], a shared function is only allowed as a public field of an actor (This is a limitation of the current version.)` at compile.

Is this still a planned feature?

---

<div class="post-metadata">

**Author:** ![claudio](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/claudio/32/322_2.png) [@claudio](https://forum.dfinity.org/u/claudio)\
**Post date:** [October 29, 2021, 11:06am UTC](https://forum.dfinity.org/t/question-about-suspendible-workflow-example/8209/2 "2021-10-29T11:06:27Z")

</div>

You mean this line, right?

> <https://github.com/dfinity/motoko/blob/76a507bc2171f109770d867ae9e1376231e48d3c/samples/pa_cars.mo#L24>

This is returning an anonymous shared function that closes over some local data.

Yeah, it’s unlikely we will support that any time soon, though its actually related to the discussion on thunks here. We would need both private entry points (not supported by the IC) and, ideally, unforgeable closures as candid values.

Curiously, this is related to @rossbergs suggestions here

> <https://github.com/dfinity/motoko/issues/2703#issuecomment-951773868>
>
> I've recently been frustrated by Motoko's inability to do raw calls as seen in t…he cycle wallet(https://github.com/dfinity/cycles-wallet/blob/5725370020593bd744ddbc589c117d76d6ca8ae4/wallet/src/lib.rs#L625).
> 
> To be able to do this I would imagine motoko would need to:
> 
> \- expose the raw call
> \- enable some kind of type reflection
> \- formalize some kind of serialization/deserialization
> 
> I've seen some mention of these in some of the open/closed meta-issue issues here and I thought I'd stand on top of the building yelling to hopefully get these some attention. :)
> 
> What I don't want to do is to have to create a function on every motoko pass through canister called \_\_forwardCall(principal: Principal; method: text, args: \[Nat8\]/WorkSpace/\[DataZones\]) and have to have every canister handle a \_\_handleForwardCall that deserializs all the parameters manually into known types and organize the community to universally add these to their canisters. perhaps there is a compiler way to automate this kind of thing? Seems overkill when the underlying functions can just be exposed some how.

---

<div class="post-metadata">

**Author:** ![Hazel](https://avatars.discourse-cdn.com/v4/letter/h/e56c9b/32.png) [@Hazel](https://forum.dfinity.org/u/Hazel)\
**Post date:** [October 29, 2021, 2:46pm UTC](https://forum.dfinity.org/t/question-about-suspendible-workflow-example/8209/3 "2021-10-29T14:46:20Z")

</div>

Apologies should have included the link! Yes thats the one.

> [@claudio](#):
>
> Yeah, it’s unlikely we will support that any time soon, though its actually related to the discussion on thunks here. We would need both private entry points (not supported by the IC) and, ideally, unforgeable closures as candid values.

Lots of fun technical challenges 😄 . Would be wonderful to have in the future but I don’t think it’s 100% necessary.

Thanks!
